LLVMFuzzerTestOneInput:
   35|  3.14k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) {
   36|  3.14k|  assert(Data);
  ------------------
  |  Branch (36:3): [True: 3.14k, False: 0]
  ------------------
   37|       |
   38|  3.14k|  try {
   39|  3.14k|    const rawspeed::Buffer b(
   40|  3.14k|        Data, rawspeed::implicit_cast<rawspeed::Buffer::size_type>(Size));
   41|  3.14k|    const rawspeed::DataBuffer db(b, rawspeed::Endianness::little);
   42|  3.14k|    rawspeed::ByteStream bs(db);
   43|       |
   44|  3.14k|    rawspeed::RawImage mRaw(CreateRawImage(bs));
   45|       |
   46|  3.14k|    const auto offsetX = bs.getU32();
   47|  3.14k|    const auto offsetY = bs.getU32();
   48|  3.14k|    const auto width = bs.getU32();
   49|  3.14k|    const auto height = bs.getU32();
   50|  3.14k|    const auto maxWidth = bs.getU32();
   51|  3.14k|    const auto maxHeight = bs.getU32();
   52|  3.14k|    const auto fixDng16Bug = bs.getU32();
   53|       |
   54|  3.14k|    rawspeed::LJpegDecoder j(bs, mRaw);
   55|  3.14k|    mRaw->createData();
   56|  3.14k|    j.decode(offsetX, offsetY, width, height,
   57|  3.14k|             rawspeed::iPoint2D(maxWidth, maxHeight), fixDng16Bug);
   58|       |
   59|       |    // we can not check that all the image was initialized, because normally
   60|       |    // LJpegDecoder decodes just some one tile/slice.
   61|  3.14k|  } catch (const rawspeed::RawspeedException&) { // NOLINT(bugprone-empty-catch)
   62|       |    // Exceptions are good, crashes are bad.
   63|  3.13k|  }
   64|       |
   65|  3.14k|  return 0;
   66|  3.14k|}

_Z14CreateRawImageRN8rawspeed10ByteStreamE:
   31|  3.14k|rawspeed::RawImage CreateRawImage(rawspeed::ByteStream& bs) {
   32|  3.14k|  const uint32_t width = bs.getU32();
   33|  3.14k|  const uint32_t height = bs.getU32();
   34|  3.14k|  const uint32_t type = bs.getU32();
   35|  3.14k|  const uint32_t cpp = bs.getU32();
   36|  3.14k|  const uint32_t isCFA = bs.getU32();
   37|       |
   38|  3.14k|  if (type != static_cast<uint32_t>(rawspeed::RawImageType::UINT16) &&
  ------------------
  |  Branch (38:7): [True: 74, False: 3.07k]
  ------------------
   39|     74|      type != static_cast<uint32_t>(rawspeed::RawImageType::F32))
  ------------------
  |  Branch (39:7): [True: 52, False: 22]
  ------------------
   40|  3.14k|    ThrowRSE("Unknown image type: %u", type);
  ------------------
  |  |   95|     52|  ThrowExceptionHelper(rawspeed::RawspeedException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     52|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     52|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     52|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   41|       |
   42|  3.09k|  rawspeed::RawImage mRaw(
   43|  3.09k|      rawspeed::RawImage::create(static_cast<rawspeed::RawImageType>(type)));
   44|       |
   45|  3.09k|  mRaw->dim =
   46|  3.09k|      rawspeed::iPoint2D(static_cast<rawspeed::iPoint2D::value_type>(width),
   47|  3.09k|                         static_cast<rawspeed::iPoint2D::value_type>(height));
   48|  3.09k|  mRaw->setCpp(cpp);
   49|  3.09k|  mRaw->isCFA = isCFA;
   50|       |
   51|  3.09k|  return mRaw;
   52|  3.14k|}

_ZNK8rawspeed16AlignedAllocatorIhLi16EE10deallocateEPhm:
   74|  2.87k|  void deallocate(T* p, std::size_t n) const noexcept {
   75|  2.87k|    invariant(p);
  ------------------
  |  |   27|  2.87k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (75:5): [True: 2.87k, False: 0]
  ------------------
   76|  2.87k|    invariant(n > 0);
  ------------------
  |  |   27|  2.87k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (76:5): [True: 2.87k, False: 0]
  ------------------
   77|  2.87k|    invariant(isAligned(p, alignment));
  ------------------
  |  |   27|  2.87k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (77:5): [True: 2.87k, False: 0]
  ------------------
   78|  2.87k|    operator delete(p, static_cast<std::align_val_t>(alignment));
   79|  2.87k|  }
_ZNK8rawspeed16AlignedAllocatorIhLi16EE8allocateEm:
   47|  2.87k|  [[nodiscard]] T* allocate(std::size_t numElts) const {
   48|  2.87k|    static_assert(size_t(alignment) >= alignof(T), "insufficient alignment");
   49|  2.87k|    invariant(numElts > 0 && "Should not be trying to allocate no elements");
  ------------------
  |  |   27|  2.87k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (49:5): [True: 2.87k, False: 0]
  |  Branch (49:5): [True: 2.87k, Folded]
  |  Branch (49:5): [True: 2.87k, False: 0]
  ------------------
   50|  2.87k|    assert(numElts <= allocator_traits::max_size(*this) &&
  ------------------
  |  Branch (50:5): [True: 2.87k, False: 0]
  |  Branch (50:5): [True: 2.87k, Folded]
  |  Branch (50:5): [True: 2.87k, False: 0]
  ------------------
   51|  2.87k|           "Can allocate this many elements.");
   52|  2.87k|    invariant(numElts <= SIZE_MAX / sizeof(T) &&
  ------------------
  |  |   27|  2.87k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (52:5): [True: 2.87k, False: 0]
  |  Branch (52:5): [True: 2.87k, Folded]
  |  Branch (52:5): [True: 2.87k, False: 0]
  ------------------
   53|  2.87k|              "Byte count calculation will not overflow");
   54|       |
   55|  2.87k|    std::size_t numBytes = sizeof(T) * numElts;
   56|       |
   57|  2.87k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   58|       |    // workaround ASAN's broken allocator_may_return_null option
   59|       |    // plus, avoidance of libFuzzer's rss_limit_mb option
   60|       |    // if trying to alloc more than 2GB, just return null.
   61|       |    // else it would abort() the whole program...
   62|  2.87k|    if (numBytes > 2UL << 30UL)
  ------------------
  |  Branch (62:9): [True: 0, False: 2.87k]
  ------------------
   63|  2.87k|      ThrowRSE("FUZZ alloc bailout (%zu bytes)", numBytes);
  ------------------
  |  |   95|      0|  ThrowExceptionHelper(rawspeed::RawspeedException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   64|  2.87k|#endif
   65|       |
   66|  2.87k|    auto* r = static_cast<T*>(operator new(
   67|  2.87k|        numBytes, static_cast<std::align_val_t>(alignment)));
   68|  2.87k|    invariant(isAligned(r, alignment));
  ------------------
  |  |   27|  2.87k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (68:5): [True: 2.87k, False: 0]
  ------------------
   69|  2.87k|    if (!r)
  ------------------
  |  Branch (69:9): [True: 0, False: 2.87k]
  ------------------
   70|  2.87k|      ThrowRSE("Out of memory while trying to allocate %zu bytes", numBytes);
  ------------------
  |  |   95|      0|  ThrowExceptionHelper(rawspeed::RawspeedException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   71|  2.87k|    return r;
   72|  2.87k|  }

_ZN8rawspeed10Array1DRefIKhEC2EPS1_i:
  104|   134M|    : data(data_), numElts(numElts_) {
  105|   134M|  establishClassInvariants();
  106|   134M|}
_ZNK8rawspeed10Array1DRefIKhE24establishClassInvariantsEv:
   97|  1.16G|Array1DRef<T>::establishClassInvariants() const noexcept {
   98|  1.16G|  invariant(data);
  ------------------
  |  |   27|  1.16G|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 1.16G, False: 0]
  ------------------
   99|  1.16G|  invariant(numElts >= 0);
  ------------------
  |  |   27|  1.16G|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 1.16G, False: 0]
  ------------------
  100|  1.16G|}
_ZNK8rawspeed10Array1DRefIKhE5beginEv:
  159|  89.7M|template <class T> inline T* Array1DRef<T>::begin() const {
  160|  89.7M|  establishClassInvariants();
  161|  89.7M|  return addressOf(/*eltIdx=*/0);
  162|  89.7M|}
_ZNK8rawspeed10Array1DRefIKhE9addressOfEi:
  133|   134M|Array1DRef<T>::addressOf(const int eltIdx) const {
  134|   134M|  establishClassInvariants();
  135|   134M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|   134M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 134M, False: 0]
  ------------------
  136|   134M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|   134M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (136:3): [True: 134M, False: 0]
  ------------------
  137|   134M|#pragma GCC diagnostic push
  138|   134M|#pragma GCC diagnostic ignored "-Wpragmas"
  139|   134M|#pragma GCC diagnostic ignored "-Wunknown-warning-option"
  140|   134M|#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
  141|   134M|  return data + eltIdx;
  142|   134M|#pragma GCC diagnostic pop
  143|   134M|}
_ZNK8rawspeed10Array1DRefIKhE4sizeEv:
  154|   583M|template <class T> inline int Array1DRef<T>::size() const {
  155|   583M|  establishClassInvariants();
  156|   583M|  return numElts;
  157|   583M|}
_ZNK8rawspeed10Array1DRefIKhE7getCropEii:
  110|  44.8M|Array1DRef<T>::getCrop(int offset, int size) const {
  111|  44.8M|  establishClassInvariants();
  112|  44.8M|  invariant(offset >= 0);
  ------------------
  |  |   27|  44.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (112:3): [True: 44.8M, False: 0]
  ------------------
  113|  44.8M|  invariant(size >= 0);
  ------------------
  |  |   27|  44.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (113:3): [True: 44.8M, False: 0]
  ------------------
  114|  44.8M|  invariant(offset <= numElts);
  ------------------
  |  |   27|  44.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (114:3): [True: 44.8M, False: 0]
  ------------------
  115|  44.8M|  invariant(size <= numElts);
  ------------------
  |  |   27|  44.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (115:3): [True: 44.8M, False: 0]
  ------------------
  116|  44.8M|  invariant(offset + size <= numElts);
  ------------------
  |  |   27|  44.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (116:3): [True: 44.8M, False: 0]
  ------------------
  117|  44.8M|  return {*this, offset, size};
  118|  44.8M|}
_ZNK8rawspeed10Array1DRefIKSt4byteE4sizeEv:
  154|   190M|template <class T> inline int Array1DRef<T>::size() const {
  155|   190M|  establishClassInvariants();
  156|   190M|  return numElts;
  157|   190M|}
_ZNK8rawspeed10Array1DRefIKSt4byteE24establishClassInvariantsEv:
   97|   362M|Array1DRef<T>::establishClassInvariants() const noexcept {
   98|   362M|  invariant(data);
  ------------------
  |  |   27|   362M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 362M, False: 0]
  ------------------
   99|   362M|  invariant(numElts >= 0);
  ------------------
  |  |   27|   362M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 362M, False: 0]
  ------------------
  100|   362M|}
_ZNK8rawspeed10Array1DRefISt4byteE4sizeEv:
  154|  84.8M|template <class T> inline int Array1DRef<T>::size() const {
  155|  84.8M|  establishClassInvariants();
  156|  84.8M|  return numElts;
  157|  84.8M|}
_ZNK8rawspeed10Array1DRefISt4byteE24establishClassInvariantsEv:
   97|   184M|Array1DRef<T>::establishClassInvariants() const noexcept {
   98|   184M|  invariant(data);
  ------------------
  |  |   27|   184M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 184M, False: 0]
  ------------------
   99|   184M|  invariant(numElts >= 0);
  ------------------
  |  |   27|   184M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 184M, False: 0]
  ------------------
  100|   184M|}
_ZNK8rawspeed10Array1DRefIKSt4byteE5beginEv:
  159|  3.61M|template <class T> inline T* Array1DRef<T>::begin() const {
  160|  3.61M|  establishClassInvariants();
  161|  3.61M|  return addressOf(/*eltIdx=*/0);
  162|  3.61M|}
_ZNK8rawspeed10Array1DRefIKSt4byteE9addressOfEi:
  133|  7.23M|Array1DRef<T>::addressOf(const int eltIdx) const {
  134|  7.23M|  establishClassInvariants();
  135|  7.23M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  7.23M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 7.23M, False: 0]
  ------------------
  136|  7.23M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  7.23M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (136:3): [True: 7.23M, False: 0]
  ------------------
  137|  7.23M|#pragma GCC diagnostic push
  138|  7.23M|#pragma GCC diagnostic ignored "-Wpragmas"
  139|  7.23M|#pragma GCC diagnostic ignored "-Wunknown-warning-option"
  140|  7.23M|#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
  141|  7.23M|  return data + eltIdx;
  142|  7.23M|#pragma GCC diagnostic pop
  143|  7.23M|}
_ZNK8rawspeed10Array1DRefISt4byteE5beginEv:
  159|  7.23M|template <class T> inline T* Array1DRef<T>::begin() const {
  160|  7.23M|  establishClassInvariants();
  161|  7.23M|  return addressOf(/*eltIdx=*/0);
  162|  7.23M|}
_ZNK8rawspeed10Array1DRefISt4byteE9addressOfEi:
  133|  23.6M|Array1DRef<T>::addressOf(const int eltIdx) const {
  134|  23.6M|  establishClassInvariants();
  135|  23.6M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  23.6M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 23.6M, False: 0]
  ------------------
  136|  23.6M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  23.6M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (136:3): [True: 23.6M, False: 0]
  ------------------
  137|  23.6M|#pragma GCC diagnostic push
  138|  23.6M|#pragma GCC diagnostic ignored "-Wpragmas"
  139|  23.6M|#pragma GCC diagnostic ignored "-Wunknown-warning-option"
  140|  23.6M|#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
  141|  23.6M|  return data + eltIdx;
  142|  23.6M|#pragma GCC diagnostic pop
  143|  23.6M|}
_ZNK8rawspeed10Array1DRefIKhE3endEv:
  163|  4.86k|template <class T> inline T* Array1DRef<T>::end() const {
  164|  4.86k|  establishClassInvariants();
  165|  4.86k|  return addressOf(/*eltIdx=*/numElts);
  166|  4.86k|}
_ZNK8rawspeed10Array1DRefISt4byteE3endEv:
  163|  6.36k|template <class T> inline T* Array1DRef<T>::end() const {
  164|  6.36k|  establishClassInvariants();
  165|  6.36k|  return addressOf(/*eltIdx=*/numElts);
  166|  6.36k|}
_ZNK8rawspeed10Array1DRefISt4byteEclEi:
  147|  11.8M|Array1DRef<T>::operator()(const int eltIdx) const {
  148|  11.8M|  establishClassInvariants();
  149|  11.8M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  11.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (149:3): [True: 11.8M, False: 0]
  ------------------
  150|  11.8M|  invariant(eltIdx < numElts);
  ------------------
  |  |   27|  11.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (150:3): [True: 11.8M, False: 0]
  ------------------
  151|  11.8M|  return *addressOf(eltIdx);
  152|  11.8M|}
_ZNK8rawspeed10Array1DRefISt4byteE7getCropEii:
  110|  4.56M|Array1DRef<T>::getCrop(int offset, int size) const {
  111|  4.56M|  establishClassInvariants();
  112|  4.56M|  invariant(offset >= 0);
  ------------------
  |  |   27|  4.56M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (112:3): [True: 4.56M, False: 0]
  ------------------
  113|  4.56M|  invariant(size >= 0);
  ------------------
  |  |   27|  4.56M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (113:3): [True: 4.56M, False: 0]
  ------------------
  114|  4.56M|  invariant(offset <= numElts);
  ------------------
  |  |   27|  4.56M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (114:3): [True: 4.56M, False: 0]
  ------------------
  115|  4.56M|  invariant(size <= numElts);
  ------------------
  |  |   27|  4.56M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (115:3): [True: 4.56M, False: 0]
  ------------------
  116|  4.56M|  invariant(offset + size <= numElts);
  ------------------
  |  |   27|  4.56M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (116:3): [True: 4.56M, False: 0]
  ------------------
  117|  4.56M|  return {*this, offset, size};
  118|  4.56M|}
_ZNK8rawspeed10Array1DRefIKSt4byteE7getCropEii:
  110|  3.61M|Array1DRef<T>::getCrop(int offset, int size) const {
  111|  3.61M|  establishClassInvariants();
  112|  3.61M|  invariant(offset >= 0);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (112:3): [True: 3.61M, False: 0]
  ------------------
  113|  3.61M|  invariant(size >= 0);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (113:3): [True: 3.61M, False: 0]
  ------------------
  114|  3.61M|  invariant(offset <= numElts);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (114:3): [True: 3.61M, False: 0]
  ------------------
  115|  3.61M|  invariant(size <= numElts);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (115:3): [True: 3.61M, False: 0]
  ------------------
  116|  3.61M|  invariant(offset + size <= numElts);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (116:3): [True: 3.61M, False: 0]
  ------------------
  117|  3.61M|  return {*this, offset, size};
  118|  3.61M|}
_ZNK8rawspeed10Array1DRefItE24establishClassInvariantsEv:
   97|   368M|Array1DRef<T>::establishClassInvariants() const noexcept {
   98|   368M|  invariant(data);
  ------------------
  |  |   27|   368M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 368M, False: 0]
  ------------------
   99|   368M|  invariant(numElts >= 0);
  ------------------
  |  |   27|   368M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 368M, False: 0]
  ------------------
  100|   368M|}
_ZNK8rawspeed10Array1DRefItE4sizeEv:
  154|   201M|template <class T> inline int Array1DRef<T>::size() const {
  155|   201M|  establishClassInvariants();
  156|   201M|  return numElts;
  157|   201M|}
_ZN8rawspeed10Array1DRefItEC2EPti:
  104|  10.4M|    : data(data_), numElts(numElts_) {
  105|  10.4M|  establishClassInvariants();
  106|  10.4M|}
_ZN8rawspeed10Array1DRefISt4byteEC2ItQaaaantaasr3stdE10is_const_vITL0__Entsr3stdE10is_const_vIT_Entsr3stdE9is_same_vIu14__remove_constIS5_Eu14__remove_constIS4_EEsr3stdE9is_same_vIS6_S1_EEENS0_IS5_EE:
   78|  2.87k|      : Array1DRef(reinterpret_cast<T*>(RHS.data), sizeof(T2) * RHS.numElts) {}
_ZN8rawspeed10Array1DRefISt4byteEC2EPS1_i:
  104|  11.8M|    : data(data_), numElts(numElts_) {
  105|  11.8M|  establishClassInvariants();
  106|  11.8M|}
_ZNK8rawspeed10Array1DRefItE9addressOfEi:
  133|  17.3M|Array1DRef<T>::addressOf(const int eltIdx) const {
  134|  17.3M|  establishClassInvariants();
  135|  17.3M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  17.3M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 17.3M, False: 0]
  ------------------
  136|  17.3M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  17.3M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (136:3): [True: 17.3M, False: 0]
  ------------------
  137|  17.3M|#pragma GCC diagnostic push
  138|  17.3M|#pragma GCC diagnostic ignored "-Wpragmas"
  139|  17.3M|#pragma GCC diagnostic ignored "-Wunknown-warning-option"
  140|  17.3M|#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
  141|  17.3M|  return data + eltIdx;
  142|  17.3M|#pragma GCC diagnostic pop
  143|  17.3M|}
_ZNK8rawspeed10Array1DRefItE7getCropEii:
  110|  10.4M|Array1DRef<T>::getCrop(int offset, int size) const {
  111|  10.4M|  establishClassInvariants();
  112|  10.4M|  invariant(offset >= 0);
  ------------------
  |  |   27|  10.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (112:3): [True: 10.4M, False: 0]
  ------------------
  113|  10.4M|  invariant(size >= 0);
  ------------------
  |  |   27|  10.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (113:3): [True: 10.4M, False: 0]
  ------------------
  114|  10.4M|  invariant(offset <= numElts);
  ------------------
  |  |   27|  10.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (114:3): [True: 10.4M, False: 0]
  ------------------
  115|  10.4M|  invariant(size <= numElts);
  ------------------
  |  |   27|  10.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (115:3): [True: 10.4M, False: 0]
  ------------------
  116|  10.4M|  invariant(offset + size <= numElts);
  ------------------
  |  |   27|  10.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (116:3): [True: 10.4M, False: 0]
  ------------------
  117|  10.4M|  return {*this, offset, size};
  118|  10.4M|}
_ZNK8rawspeed10Array1DRefItEclEi:
  147|  6.92M|Array1DRef<T>::operator()(const int eltIdx) const {
  148|  6.92M|  establishClassInvariants();
  149|  6.92M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  6.92M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (149:3): [True: 6.92M, False: 0]
  ------------------
  150|  6.92M|  invariant(eltIdx < numElts);
  ------------------
  |  |   27|  6.92M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (150:3): [True: 6.92M, False: 0]
  ------------------
  151|  6.92M|  return *addressOf(eltIdx);
  152|  6.92M|}
_ZN8rawspeed10Array1DRefIKSt4byteEC2IKhQaaaantaasr3stdE10is_const_vITL0__Entsr3stdE10is_const_vIT_Entsr3stdE9is_same_vIu14__remove_constIS7_Eu14__remove_constIS6_EEsr3stdE9is_same_vIS8_S1_EEENS0_IS7_EE:
   78|  1.70k|      : Array1DRef(reinterpret_cast<T*>(RHS.data), sizeof(T2) * RHS.numElts) {}
_ZN8rawspeed10Array1DRefIKSt4byteEC2EPS2_i:
  104|  3.61M|    : data(data_), numElts(numElts_) {
  105|  3.61M|  establishClassInvariants();
  106|  3.61M|}
_ZNK8rawspeed10Array1DRefIKtE24establishClassInvariantsEv:
   97|   220M|Array1DRef<T>::establishClassInvariants() const noexcept {
   98|   220M|  invariant(data);
  ------------------
  |  |   27|   220M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 220M, False: 0]
  ------------------
   99|   220M|  invariant(numElts >= 0);
  ------------------
  |  |   27|   220M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 220M, False: 0]
  ------------------
  100|   220M|}
_ZNK8rawspeed10Array1DRefIKtE4sizeEv:
  154|   119M|template <class T> inline int Array1DRef<T>::size() const {
  155|   119M|  establishClassInvariants();
  156|   119M|  return numElts;
  157|   119M|}
_ZNK8rawspeed10Array1DRefIKtE7getCropEii:
  110|  6.94M|Array1DRef<T>::getCrop(int offset, int size) const {
  111|  6.94M|  establishClassInvariants();
  112|  6.94M|  invariant(offset >= 0);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (112:3): [True: 6.94M, False: 0]
  ------------------
  113|  6.94M|  invariant(size >= 0);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (113:3): [True: 6.94M, False: 0]
  ------------------
  114|  6.94M|  invariant(offset <= numElts);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (114:3): [True: 6.94M, False: 0]
  ------------------
  115|  6.94M|  invariant(size <= numElts);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (115:3): [True: 6.94M, False: 0]
  ------------------
  116|  6.94M|  invariant(offset + size <= numElts);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (116:3): [True: 6.94M, False: 0]
  ------------------
  117|  6.94M|  return {*this, offset, size};
  118|  6.94M|}
_ZNK8rawspeed10Array1DRefIKtE9addressOfEi:
  133|  13.8M|Array1DRef<T>::addressOf(const int eltIdx) const {
  134|  13.8M|  establishClassInvariants();
  135|  13.8M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  13.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 13.8M, False: 0]
  ------------------
  136|  13.8M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  13.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (136:3): [True: 13.8M, False: 0]
  ------------------
  137|  13.8M|#pragma GCC diagnostic push
  138|  13.8M|#pragma GCC diagnostic ignored "-Wpragmas"
  139|  13.8M|#pragma GCC diagnostic ignored "-Wunknown-warning-option"
  140|  13.8M|#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
  141|  13.8M|  return data + eltIdx;
  142|  13.8M|#pragma GCC diagnostic pop
  143|  13.8M|}
_ZN8rawspeed10Array1DRefIKtEC2EPS1_i:
  104|  8.67M|    : data(data_), numElts(numElts_) {
  105|  8.67M|  establishClassInvariants();
  106|  8.67M|}
_ZNK8rawspeed10Array1DRefIKtEclEi:
  147|  6.94M|Array1DRef<T>::operator()(const int eltIdx) const {
  148|  6.94M|  establishClassInvariants();
  149|  6.94M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (149:3): [True: 6.94M, False: 0]
  ------------------
  150|  6.94M|  invariant(eltIdx < numElts);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (150:3): [True: 6.94M, False: 0]
  ------------------
  151|  6.94M|  return *addressOf(eltIdx);
  152|  6.94M|}
_ZN8rawspeed10Array1DRefIKtEC2ItQaaaantsr3stdE10is_const_vITL0__Esr3stdE10is_const_vIT_Esr3stdE9is_same_vIu14__remove_constIS5_Eu14__remove_constIS4_EEEENS0_IS5_EE:
   69|  1.73M|      : Array1DRef(RHS.data, RHS.numElts) {}

_ZNK8rawspeed10Array2DRefISt4byteE5widthEv:
  165|  9.11M|__attribute__((always_inline)) inline int Array2DRef<T>::width() const {
  166|  9.11M|  establishClassInvariants();
  167|  9.11M|  return _width;
  168|  9.11M|}
_ZNK8rawspeed10Array2DRefISt4byteE24establishClassInvariantsEv:
  127|  22.7M|Array2DRef<T>::establishClassInvariants() const noexcept {
  128|  22.7M|  data.establishClassInvariants();
  129|  22.7M|  invariant(_width >= 0);
  ------------------
  |  |   27|  22.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (129:3): [True: 22.7M, False: 0]
  ------------------
  130|  22.7M|  invariant(_height >= 0);
  ------------------
  |  |   27|  22.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (130:3): [True: 22.7M, False: 0]
  ------------------
  131|  22.7M|  invariant(_pitch != 0);
  ------------------
  |  |   27|  22.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (131:3): [True: 22.7M, False: 0]
  ------------------
  132|  22.7M|  invariant(_pitch >= 0);
  ------------------
  |  |   27|  22.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (132:3): [True: 22.7M, False: 0]
  ------------------
  133|  22.7M|  invariant(_pitch >= _width);
  ------------------
  |  |   27|  22.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (133:3): [True: 22.7M, False: 0]
  ------------------
  134|  22.7M|  invariant((_width == 0) == (_height == 0));
  ------------------
  |  |   27|  22.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (134:3): [True: 22.7M, False: 0]
  ------------------
  135|  22.7M|  invariant(data.size() == _pitch * _height);
  ------------------
  |  |   27|  22.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 22.7M, False: 0]
  ------------------
  136|  22.7M|}
_ZNK8rawspeed10Array2DRefISt4byteE6heightEv:
  171|  4.55M|__attribute__((always_inline)) inline int Array2DRef<T>::height() const {
  172|  4.55M|  establishClassInvariants();
  173|  4.55M|  return _height;
  174|  4.55M|}
_ZNK8rawspeed10Array2DRefISt4byteEixEi:
  186|  4.55M|inline Array1DRef<T> Array2DRef<T>::operator[](const int row) const {
  187|  4.55M|  establishClassInvariants();
  188|  4.55M|  invariant(row >= 0);
  ------------------
  |  |   27|  4.55M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (188:3): [True: 4.55M, False: 0]
  ------------------
  189|  4.55M|  invariant(row < height());
  ------------------
  |  |   27|  4.55M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (189:3): [True: 4.55M, False: 0]
  ------------------
  190|  4.55M|  return data.getCrop(row * _pitch, width()).getAsArray1DRef();
  191|  4.55M|}
_ZNK8rawspeed10Array2DRefItE24establishClassInvariantsEv:
  127|  81.8M|Array2DRef<T>::establishClassInvariants() const noexcept {
  128|  81.8M|  data.establishClassInvariants();
  129|  81.8M|  invariant(_width >= 0);
  ------------------
  |  |   27|  81.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (129:3): [True: 81.8M, False: 0]
  ------------------
  130|  81.8M|  invariant(_height >= 0);
  ------------------
  |  |   27|  81.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (130:3): [True: 81.8M, False: 0]
  ------------------
  131|  81.8M|  invariant(_pitch != 0);
  ------------------
  |  |   27|  81.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (131:3): [True: 81.8M, False: 0]
  ------------------
  132|  81.8M|  invariant(_pitch >= 0);
  ------------------
  |  |   27|  81.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (132:3): [True: 81.8M, False: 0]
  ------------------
  133|  81.8M|  invariant(_pitch >= _width);
  ------------------
  |  |   27|  81.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (133:3): [True: 81.8M, False: 0]
  ------------------
  134|  81.8M|  invariant((_width == 0) == (_height == 0));
  ------------------
  |  |   27|  81.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (134:3): [True: 81.8M, False: 0]
  ------------------
  135|  81.8M|  invariant(data.size() == _pitch * _height);
  ------------------
  |  |   27|  81.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 81.8M, False: 0]
  ------------------
  136|  81.8M|}
_ZNK8rawspeed10Array2DRefItE5widthEv:
  165|  31.3M|__attribute__((always_inline)) inline int Array2DRef<T>::width() const {
  166|  31.3M|  establishClassInvariants();
  167|  31.3M|  return _width;
  168|  31.3M|}
_ZNK8rawspeed10Array2DRefItE6heightEv:
  171|  24.4M|__attribute__((always_inline)) inline int Array2DRef<T>::height() const {
  172|  24.4M|  establishClassInvariants();
  173|  24.4M|  return _height;
  174|  24.4M|}
_ZN8rawspeed10Array2DRefItEC2EPtiii:
  148|  1.75M|    : Array2DRef({data_, pitch_ * height_}, width_, height_, pitch_) {
  149|  1.75M|  establishClassInvariants();
  150|  1.75M|}
_ZN8rawspeed10Array2DRefItEC2ENS_10Array1DRefItEEiii:
  141|  1.75M|    : data(data_), _pitch(pitch_), _width(width_), _height(height_) {
  142|  1.75M|  establishClassInvariants();
  143|  1.75M|}
_ZN8rawspeed10Array2DRefISt4byteEC2ItQaaaantaasr3stdE10is_const_vITL0__Entsr3stdE10is_const_vIT_Entsr3stdE9is_same_vIu14__remove_constIS5_Eu14__remove_constIS4_EEsr3stdE9is_same_vIS6_S1_EEENS0_IS5_EE:
   92|  2.87k|      : Array2DRef(RHS.data, sizeof(T2) * RHS._width, RHS._height,
   93|  2.87k|                   sizeof(T2) * RHS._pitch) {}
_ZN8rawspeed10Array2DRefISt4byteEC2ENS_10Array1DRefIS1_EEiii:
  141|  2.87k|    : data(data_), _pitch(pitch_), _width(width_), _height(height_) {
  142|  2.87k|  establishClassInvariants();
  143|  2.87k|}
_ZNK8rawspeed10Array2DRefISt4byteEclEii:
  195|  4.55M|Array2DRef<T>::operator()(const int row, const int col) const {
  196|  4.55M|  establishClassInvariants();
  197|  4.55M|  invariant(col >= 0);
  ------------------
  |  |   27|  4.55M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (197:3): [True: 4.55M, False: 0]
  ------------------
  198|  4.55M|  invariant(col < width());
  ------------------
  |  |   27|  4.55M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (198:3): [True: 4.55M, False: 0]
  ------------------
  199|  4.55M|  return (operator[](row))(col);
  200|  4.55M|}
_ZNK8rawspeed10Array2DRefItEixEi:
  186|  8.67M|inline Array1DRef<T> Array2DRef<T>::operator[](const int row) const {
  187|  8.67M|  establishClassInvariants();
  188|  8.67M|  invariant(row >= 0);
  ------------------
  |  |   27|  8.67M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (188:3): [True: 8.67M, False: 0]
  ------------------
  189|  8.67M|  invariant(row < height());
  ------------------
  |  |   27|  8.67M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (189:3): [True: 8.67M, False: 0]
  ------------------
  190|  8.67M|  return data.getCrop(row * _pitch, width()).getAsArray1DRef();
  191|  8.67M|}
_ZN8rawspeed10Array2DRefItEC2EPtii:
  154|  1.74k|    : Array2DRef(data_, width_, height_, /*pitch=*/width_) {
  155|  1.74k|  establishClassInvariants();
  156|  1.74k|}
_ZNK8rawspeed10Array2DRefItE5pitchEv:
  159|  1.74M|__attribute__((always_inline)) inline int Array2DRef<T>::pitch() const {
  160|  1.74M|  establishClassInvariants();
  161|  1.74M|  return _pitch;
  162|  1.74M|}
_ZNK8rawspeed10Array2DRefIKtE5widthEv:
  165|  13.8M|__attribute__((always_inline)) inline int Array2DRef<T>::width() const {
  166|  13.8M|  establishClassInvariants();
  167|  13.8M|  return _width;
  168|  13.8M|}
_ZNK8rawspeed10Array2DRefIKtE24establishClassInvariantsEv:
  127|  36.4M|Array2DRef<T>::establishClassInvariants() const noexcept {
  128|  36.4M|  data.establishClassInvariants();
  129|  36.4M|  invariant(_width >= 0);
  ------------------
  |  |   27|  36.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (129:3): [True: 36.4M, False: 0]
  ------------------
  130|  36.4M|  invariant(_height >= 0);
  ------------------
  |  |   27|  36.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (130:3): [True: 36.4M, False: 0]
  ------------------
  131|  36.4M|  invariant(_pitch != 0);
  ------------------
  |  |   27|  36.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (131:3): [True: 36.4M, False: 0]
  ------------------
  132|  36.4M|  invariant(_pitch >= 0);
  ------------------
  |  |   27|  36.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (132:3): [True: 36.4M, False: 0]
  ------------------
  133|  36.4M|  invariant(_pitch >= _width);
  ------------------
  |  |   27|  36.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (133:3): [True: 36.4M, False: 0]
  ------------------
  134|  36.4M|  invariant((_width == 0) == (_height == 0));
  ------------------
  |  |   27|  36.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (134:3): [True: 36.4M, False: 0]
  ------------------
  135|  36.4M|  invariant(data.size() == _pitch * _height);
  ------------------
  |  |   27|  36.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 36.4M, False: 0]
  ------------------
  136|  36.4M|}
_ZNK8rawspeed10Array2DRefIKtE6heightEv:
  171|  6.94M|__attribute__((always_inline)) inline int Array2DRef<T>::height() const {
  172|  6.94M|  establishClassInvariants();
  173|  6.94M|  return _height;
  174|  6.94M|}
_ZNK8rawspeed10Array2DRefIKtEclEii:
  195|  6.94M|Array2DRef<T>::operator()(const int row, const int col) const {
  196|  6.94M|  establishClassInvariants();
  197|  6.94M|  invariant(col >= 0);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (197:3): [True: 6.94M, False: 0]
  ------------------
  198|  6.94M|  invariant(col < width());
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (198:3): [True: 6.94M, False: 0]
  ------------------
  199|  6.94M|  return (operator[](row))(col);
  200|  6.94M|}
_ZNK8rawspeed10Array2DRefIKtEixEi:
  186|  6.94M|inline Array1DRef<T> Array2DRef<T>::operator[](const int row) const {
  187|  6.94M|  establishClassInvariants();
  188|  6.94M|  invariant(row >= 0);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (188:3): [True: 6.94M, False: 0]
  ------------------
  189|  6.94M|  invariant(row < height());
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (189:3): [True: 6.94M, False: 0]
  ------------------
  190|  6.94M|  return data.getCrop(row * _pitch, width()).getAsArray1DRef();
  191|  6.94M|}
_ZNK8rawspeed10Array2DRefItEclEii:
  195|  6.92M|Array2DRef<T>::operator()(const int row, const int col) const {
  196|  6.92M|  establishClassInvariants();
  197|  6.92M|  invariant(col >= 0);
  ------------------
  |  |   27|  6.92M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (197:3): [True: 6.92M, False: 0]
  ------------------
  198|  6.92M|  invariant(col < width());
  ------------------
  |  |   27|  6.92M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (198:3): [True: 6.92M, False: 0]
  ------------------
  199|  6.92M|  return (operator[](row))(col);
  200|  6.92M|}
_ZN8rawspeed10Array2DRefIKtEC2ItQaaaantsr3stdE10is_const_vITL0__Esr3stdE10is_const_vIT_Esr3stdE9is_same_vIu14__remove_constIS5_Eu14__remove_constIS4_EEEENS0_IS5_EE:
   83|  1.73M|      : Array2DRef(RHS.data, RHS._width, RHS._height, RHS._pitch) {}
_ZN8rawspeed10Array2DRefIKtEC2ENS_10Array1DRefIS1_EEiii:
  141|  1.73M|    : data(data_), _pitch(pitch_), _width(width_), _height(height_) {
  142|  1.73M|  establishClassInvariants();
  143|  1.73M|}

_ZN8rawspeed8bitwidthImEEjT_:
   43|  40.5M|constexpr unsigned RAWSPEED_READNONE bitwidth([[maybe_unused]] T unused = {}) {
   44|       |  return CHAR_BIT * sizeof(T);
   45|  40.5M|}
_ZN8rawspeed15extractHighBitsImQsr3stdE13is_unsigned_vIT_EEES1_S1_jj:
  121|  40.5M|    T value, unsigned nBits, unsigned effectiveBitwidth = bitwidth<T>()) {
  122|  40.5M|  invariant(effectiveBitwidth <= bitwidth<T>());
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (122:3): [True: 40.5M, False: 0]
  ------------------
  123|  40.5M|  invariant(nBits <= effectiveBitwidth);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (123:3): [True: 40.5M, False: 0]
  ------------------
  124|  40.5M|  auto numLowBitsToSkip = effectiveBitwidth - nBits;
  125|  40.5M|  invariant(numLowBitsToSkip < bitwidth<T>());
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (125:3): [True: 40.5M, False: 0]
  ------------------
  126|  40.5M|  return value >> numLowBitsToSkip;
  127|  40.5M|}
_ZN8rawspeed8bitwidthItEEjT_:
   43|   447k|constexpr unsigned RAWSPEED_READNONE bitwidth([[maybe_unused]] T unused = {}) {
   44|       |  return CHAR_BIT * sizeof(T);
   45|   447k|}
_ZN8rawspeed15extractHighBitsItQsr3stdE13is_unsigned_vIT_EEES1_S1_jj:
  121|   447k|    T value, unsigned nBits, unsigned effectiveBitwidth = bitwidth<T>()) {
  122|   447k|  invariant(effectiveBitwidth <= bitwidth<T>());
  ------------------
  |  |   27|   447k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (122:3): [True: 447k, False: 0]
  ------------------
  123|   447k|  invariant(nBits <= effectiveBitwidth);
  ------------------
  |  |   27|   447k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (123:3): [True: 447k, False: 0]
  ------------------
  124|   447k|  auto numLowBitsToSkip = effectiveBitwidth - nBits;
  125|   447k|  invariant(numLowBitsToSkip < bitwidth<T>());
  ------------------
  |  |   27|   447k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (125:3): [True: 447k, False: 0]
  ------------------
  126|   447k|  return value >> numLowBitsToSkip;
  127|   447k|}

_ZN8rawspeed13implicit_castIjmQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  40.5M|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  40.5M|#pragma GCC diagnostic push
   34|  40.5M|#pragma GCC diagnostic ignored "-Wconversion"
   35|  40.5M|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  40.5M|  return value;
   37|  40.5M|#pragma GCC diagnostic pop
   38|  40.5M|}
_ZN8rawspeed13implicit_castIijQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  89.7M|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  89.7M|#pragma GCC diagnostic push
   34|  89.7M|#pragma GCC diagnostic ignored "-Wconversion"
   35|  89.7M|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  89.7M|  return value;
   37|  89.7M|#pragma GCC diagnostic pop
   38|  89.7M|}
_ZN8rawspeed13implicit_castIhiQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  6.15M|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  6.15M|#pragma GCC diagnostic push
   34|  6.15M|#pragma GCC diagnostic ignored "-Wconversion"
   35|  6.15M|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  6.15M|  return value;
   37|  6.15M|#pragma GCC diagnostic pop
   38|  6.15M|}
_ZN8rawspeed13implicit_castItjQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  37.4M|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  37.4M|#pragma GCC diagnostic push
   34|  37.4M|#pragma GCC diagnostic ignored "-Wconversion"
   35|  37.4M|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  37.4M|  return value;
   37|  37.4M|#pragma GCC diagnostic pop
   38|  37.4M|}
_ZN8rawspeed13implicit_castIimQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  7.24M|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  7.24M|#pragma GCC diagnostic push
   34|  7.24M|#pragma GCC diagnostic ignored "-Wconversion"
   35|  7.24M|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  7.24M|  return value;
   37|  7.24M|#pragma GCC diagnostic pop
   38|  7.24M|}
_ZN8rawspeed13implicit_castItiQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  12.6k|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  12.6k|#pragma GCC diagnostic push
   34|  12.6k|#pragma GCC diagnostic ignored "-Wconversion"
   35|  12.6k|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  12.6k|  return value;
   37|  12.6k|#pragma GCC diagnostic pop
   38|  12.6k|}
_ZN8rawspeed13implicit_castIjiQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  5.12k|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  5.12k|#pragma GCC diagnostic push
   34|  5.12k|#pragma GCC diagnostic ignored "-Wconversion"
   35|  5.12k|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  5.12k|  return value;
   37|  5.12k|#pragma GCC diagnostic pop
   38|  5.12k|}
_ZN8rawspeed13implicit_castIliQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  1.71k|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  1.71k|#pragma GCC diagnostic push
   34|  1.71k|#pragma GCC diagnostic ignored "-Wconversion"
   35|  1.71k|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  1.71k|  return value;
   37|  1.71k|#pragma GCC diagnostic pop
   38|  1.71k|}
_ZN8rawspeed13implicit_castImiQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  1.60k|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  1.60k|#pragma GCC diagnostic push
   34|  1.60k|#pragma GCC diagnostic ignored "-Wconversion"
   35|  1.60k|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  1.60k|  return value;
   37|  1.60k|#pragma GCC diagnostic pop
   38|  1.60k|}

_ZN8rawspeed17CroppedArray1DRefIKhEC2ENS_10Array1DRefIS1_EEii:
  107|  44.8M|    : base(base_), offset(offset_), numElts(numElts_) {
  108|  44.8M|  establishClassInvariants();
  109|  44.8M|}
_ZNK8rawspeed17CroppedArray1DRefIKhE24establishClassInvariantsEv:
   94|   179M|CroppedArray1DRef<T>::establishClassInvariants() const noexcept {
   95|   179M|  base.establishClassInvariants();
   96|   179M|  invariant(offset >= 0);
  ------------------
  |  |   27|   179M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (96:3): [True: 179M, False: 0]
  ------------------
   97|   179M|  invariant(numElts >= 0);
  ------------------
  |  |   27|   179M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (97:3): [True: 179M, False: 0]
  ------------------
   98|   179M|  invariant(offset <= base.size());
  ------------------
  |  |   27|   179M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 179M, False: 0]
  ------------------
   99|   179M|  invariant(numElts <= base.size());
  ------------------
  |  |   27|   179M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 179M, False: 0]
  ------------------
  100|   179M|  invariant(offset + numElts <= base.size());
  ------------------
  |  |   27|   179M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:3): [True: 179M, False: 0]
  ------------------
  101|   179M|}
_ZNK8rawspeed17CroppedArray1DRefIKhE15getAsArray1DRefEv:
   71|  44.8M|  [[nodiscard]] Array1DRef<T> getAsArray1DRef() const {
   72|  44.8M|    return {begin(), size()};
   73|  44.8M|  }
_ZNK8rawspeed17CroppedArray1DRefIKhE5beginEv:
  137|  44.8M|template <class T> inline T* CroppedArray1DRef<T>::begin() const {
  138|  44.8M|  establishClassInvariants();
  139|  44.8M|  return addressOf(/*eltIdx=*/0);
  140|  44.8M|}
_ZNK8rawspeed17CroppedArray1DRefIKhE9addressOfEi:
  152|  44.8M|inline T* CroppedArray1DRef<T>::addressOf(const int eltIdx) const {
  153|  44.8M|  establishClassInvariants();
  154|  44.8M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  44.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (154:3): [True: 44.8M, False: 0]
  ------------------
  155|  44.8M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  44.8M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (155:3): [True: 44.8M, False: 0]
  ------------------
  156|  44.8M|  return base.addressOf(offset + eltIdx);
  157|  44.8M|}
_ZNK8rawspeed17CroppedArray1DRefIKhE4sizeEv:
  146|  44.8M|template <class T> inline int CroppedArray1DRef<T>::size() const {
  147|  44.8M|  establishClassInvariants();
  148|  44.8M|  return numElts;
  149|  44.8M|}
_ZNK8rawspeed17CroppedArray1DRefISt4byteE24establishClassInvariantsEv:
   94|  18.2M|CroppedArray1DRef<T>::establishClassInvariants() const noexcept {
   95|  18.2M|  base.establishClassInvariants();
   96|  18.2M|  invariant(offset >= 0);
  ------------------
  |  |   27|  18.2M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (96:3): [True: 18.2M, False: 0]
  ------------------
   97|  18.2M|  invariant(numElts >= 0);
  ------------------
  |  |   27|  18.2M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (97:3): [True: 18.2M, False: 0]
  ------------------
   98|  18.2M|  invariant(offset <= base.size());
  ------------------
  |  |   27|  18.2M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 18.2M, False: 0]
  ------------------
   99|  18.2M|  invariant(numElts <= base.size());
  ------------------
  |  |   27|  18.2M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 18.2M, False: 0]
  ------------------
  100|  18.2M|  invariant(offset + numElts <= base.size());
  ------------------
  |  |   27|  18.2M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:3): [True: 18.2M, False: 0]
  ------------------
  101|  18.2M|}
_ZNK8rawspeed17CroppedArray1DRefISt4byteE15getAsArray1DRefEv:
   71|  4.56M|  [[nodiscard]] Array1DRef<T> getAsArray1DRef() const {
   72|  4.56M|    return {begin(), size()};
   73|  4.56M|  }
_ZNK8rawspeed17CroppedArray1DRefISt4byteE5beginEv:
  137|  4.56M|template <class T> inline T* CroppedArray1DRef<T>::begin() const {
  138|  4.56M|  establishClassInvariants();
  139|  4.56M|  return addressOf(/*eltIdx=*/0);
  140|  4.56M|}
_ZNK8rawspeed17CroppedArray1DRefISt4byteE9addressOfEi:
  152|  4.56M|inline T* CroppedArray1DRef<T>::addressOf(const int eltIdx) const {
  153|  4.56M|  establishClassInvariants();
  154|  4.56M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  4.56M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (154:3): [True: 4.56M, False: 0]
  ------------------
  155|  4.56M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  4.56M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (155:3): [True: 4.56M, False: 0]
  ------------------
  156|  4.56M|  return base.addressOf(offset + eltIdx);
  157|  4.56M|}
_ZNK8rawspeed17CroppedArray1DRefISt4byteE4sizeEv:
  146|  4.56M|template <class T> inline int CroppedArray1DRef<T>::size() const {
  147|  4.56M|  establishClassInvariants();
  148|  4.56M|  return numElts;
  149|  4.56M|}
_ZNK8rawspeed17CroppedArray1DRefIKSt4byteE24establishClassInvariantsEv:
   94|  14.4M|CroppedArray1DRef<T>::establishClassInvariants() const noexcept {
   95|  14.4M|  base.establishClassInvariants();
   96|  14.4M|  invariant(offset >= 0);
  ------------------
  |  |   27|  14.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (96:3): [True: 14.4M, False: 0]
  ------------------
   97|  14.4M|  invariant(numElts >= 0);
  ------------------
  |  |   27|  14.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (97:3): [True: 14.4M, False: 0]
  ------------------
   98|  14.4M|  invariant(offset <= base.size());
  ------------------
  |  |   27|  14.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 14.4M, False: 0]
  ------------------
   99|  14.4M|  invariant(numElts <= base.size());
  ------------------
  |  |   27|  14.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 14.4M, False: 0]
  ------------------
  100|  14.4M|  invariant(offset + numElts <= base.size());
  ------------------
  |  |   27|  14.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:3): [True: 14.4M, False: 0]
  ------------------
  101|  14.4M|}
_ZNK8rawspeed17CroppedArray1DRefIKSt4byteE15getAsArray1DRefEv:
   71|  3.61M|  [[nodiscard]] Array1DRef<T> getAsArray1DRef() const {
   72|  3.61M|    return {begin(), size()};
   73|  3.61M|  }
_ZNK8rawspeed17CroppedArray1DRefIKSt4byteE5beginEv:
  137|  3.61M|template <class T> inline T* CroppedArray1DRef<T>::begin() const {
  138|  3.61M|  establishClassInvariants();
  139|  3.61M|  return addressOf(/*eltIdx=*/0);
  140|  3.61M|}
_ZNK8rawspeed17CroppedArray1DRefIKSt4byteE9addressOfEi:
  152|  3.61M|inline T* CroppedArray1DRef<T>::addressOf(const int eltIdx) const {
  153|  3.61M|  establishClassInvariants();
  154|  3.61M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (154:3): [True: 3.61M, False: 0]
  ------------------
  155|  3.61M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (155:3): [True: 3.61M, False: 0]
  ------------------
  156|  3.61M|  return base.addressOf(offset + eltIdx);
  157|  3.61M|}
_ZNK8rawspeed17CroppedArray1DRefIKSt4byteE4sizeEv:
  146|  3.61M|template <class T> inline int CroppedArray1DRef<T>::size() const {
  147|  3.61M|  establishClassInvariants();
  148|  3.61M|  return numElts;
  149|  3.61M|}
_ZN8rawspeed17CroppedArray1DRefISt4byteEC2ENS_10Array1DRefIS1_EEii:
  107|  4.56M|    : base(base_), offset(offset_), numElts(numElts_) {
  108|  4.56M|  establishClassInvariants();
  109|  4.56M|}
_ZNK8rawspeed17CroppedArray1DRefItE15getAsArray1DRefEv:
   71|  8.67M|  [[nodiscard]] Array1DRef<T> getAsArray1DRef() const {
   72|  8.67M|    return {begin(), size()};
   73|  8.67M|  }
_ZNK8rawspeed17CroppedArray1DRefItE5beginEv:
  137|  10.4M|template <class T> inline T* CroppedArray1DRef<T>::begin() const {
  138|  10.4M|  establishClassInvariants();
  139|  10.4M|  return addressOf(/*eltIdx=*/0);
  140|  10.4M|}
_ZNK8rawspeed17CroppedArray1DRefItE24establishClassInvariantsEv:
   94|  39.9M|CroppedArray1DRef<T>::establishClassInvariants() const noexcept {
   95|  39.9M|  base.establishClassInvariants();
   96|  39.9M|  invariant(offset >= 0);
  ------------------
  |  |   27|  39.9M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (96:3): [True: 39.9M, False: 0]
  ------------------
   97|  39.9M|  invariant(numElts >= 0);
  ------------------
  |  |   27|  39.9M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (97:3): [True: 39.9M, False: 0]
  ------------------
   98|  39.9M|  invariant(offset <= base.size());
  ------------------
  |  |   27|  39.9M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 39.9M, False: 0]
  ------------------
   99|  39.9M|  invariant(numElts <= base.size());
  ------------------
  |  |   27|  39.9M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 39.9M, False: 0]
  ------------------
  100|  39.9M|  invariant(offset + numElts <= base.size());
  ------------------
  |  |   27|  39.9M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:3): [True: 39.9M, False: 0]
  ------------------
  101|  39.9M|}
_ZNK8rawspeed17CroppedArray1DRefItE9addressOfEi:
  152|  10.4M|inline T* CroppedArray1DRef<T>::addressOf(const int eltIdx) const {
  153|  10.4M|  establishClassInvariants();
  154|  10.4M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  10.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (154:3): [True: 10.4M, False: 0]
  ------------------
  155|  10.4M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  10.4M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (155:3): [True: 10.4M, False: 0]
  ------------------
  156|  10.4M|  return base.addressOf(offset + eltIdx);
  157|  10.4M|}
_ZNK8rawspeed17CroppedArray1DRefItE4sizeEv:
  146|  8.67M|template <class T> inline int CroppedArray1DRef<T>::size() const {
  147|  8.67M|  establishClassInvariants();
  148|  8.67M|  return numElts;
  149|  8.67M|}
_ZN8rawspeed17CroppedArray1DRefItEC2ENS_10Array1DRefItEEii:
  107|  10.4M|    : base(base_), offset(offset_), numElts(numElts_) {
  108|  10.4M|  establishClassInvariants();
  109|  10.4M|}
_ZN8rawspeed17CroppedArray1DRefIKtEC2ENS_10Array1DRefIS1_EEii:
  107|  6.94M|    : base(base_), offset(offset_), numElts(numElts_) {
  108|  6.94M|  establishClassInvariants();
  109|  6.94M|}
_ZNK8rawspeed17CroppedArray1DRefIKtE24establishClassInvariantsEv:
   94|  27.7M|CroppedArray1DRef<T>::establishClassInvariants() const noexcept {
   95|  27.7M|  base.establishClassInvariants();
   96|  27.7M|  invariant(offset >= 0);
  ------------------
  |  |   27|  27.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (96:3): [True: 27.7M, False: 0]
  ------------------
   97|  27.7M|  invariant(numElts >= 0);
  ------------------
  |  |   27|  27.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (97:3): [True: 27.7M, False: 0]
  ------------------
   98|  27.7M|  invariant(offset <= base.size());
  ------------------
  |  |   27|  27.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 27.7M, False: 0]
  ------------------
   99|  27.7M|  invariant(numElts <= base.size());
  ------------------
  |  |   27|  27.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 27.7M, False: 0]
  ------------------
  100|  27.7M|  invariant(offset + numElts <= base.size());
  ------------------
  |  |   27|  27.7M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:3): [True: 27.7M, False: 0]
  ------------------
  101|  27.7M|}
_ZNK8rawspeed17CroppedArray1DRefIKtE15getAsArray1DRefEv:
   71|  6.94M|  [[nodiscard]] Array1DRef<T> getAsArray1DRef() const {
   72|  6.94M|    return {begin(), size()};
   73|  6.94M|  }
_ZNK8rawspeed17CroppedArray1DRefIKtE5beginEv:
  137|  6.94M|template <class T> inline T* CroppedArray1DRef<T>::begin() const {
  138|  6.94M|  establishClassInvariants();
  139|  6.94M|  return addressOf(/*eltIdx=*/0);
  140|  6.94M|}
_ZNK8rawspeed17CroppedArray1DRefIKtE9addressOfEi:
  152|  6.94M|inline T* CroppedArray1DRef<T>::addressOf(const int eltIdx) const {
  153|  6.94M|  establishClassInvariants();
  154|  6.94M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (154:3): [True: 6.94M, False: 0]
  ------------------
  155|  6.94M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  6.94M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (155:3): [True: 6.94M, False: 0]
  ------------------
  156|  6.94M|  return base.addressOf(offset + eltIdx);
  157|  6.94M|}
_ZNK8rawspeed17CroppedArray1DRefIKtE4sizeEv:
  146|  6.94M|template <class T> inline int CroppedArray1DRef<T>::size() const {
  147|  6.94M|  establishClassInvariants();
  148|  6.94M|  return numElts;
  149|  6.94M|}
_ZN8rawspeed17CroppedArray1DRefIKSt4byteEC2ENS_10Array1DRefIS2_EEii:
  107|  3.61M|    : base(base_), offset(offset_), numElts(numElts_) {
  108|  3.61M|  establishClassInvariants();
  109|  3.61M|}

_ZNK8rawspeed17CroppedArray2DRefItE24establishClassInvariantsEv:
   98|  5.24M|CroppedArray2DRef<T>::establishClassInvariants() const noexcept {
   99|  5.24M|  base.establishClassInvariants();
  100|  5.24M|  invariant(offsetCols >= 0);
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:3): [True: 5.24M, False: 0]
  ------------------
  101|  5.24M|  invariant(offsetRows >= 0);
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (101:3): [True: 5.24M, False: 0]
  ------------------
  102|  5.24M|  invariant(croppedWidth >= 0);
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (102:3): [True: 5.24M, False: 0]
  ------------------
  103|  5.24M|  invariant(croppedHeight >= 0);
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (103:3): [True: 5.24M, False: 0]
  ------------------
  104|  5.24M|  invariant(offsetCols <= base.width());
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (104:3): [True: 5.24M, False: 0]
  ------------------
  105|  5.24M|  invariant(offsetRows <= base.height());
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (105:3): [True: 5.24M, False: 0]
  ------------------
  106|  5.24M|  invariant(croppedWidth <= base.width());
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (106:3): [True: 5.24M, False: 0]
  ------------------
  107|  5.24M|  invariant(croppedHeight <= base.height());
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (107:3): [True: 5.24M, False: 0]
  ------------------
  108|  5.24M|  invariant(offsetCols + croppedWidth <= base.width());
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (108:3): [True: 5.24M, False: 0]
  ------------------
  109|  5.24M|  invariant(offsetRows + croppedHeight <= base.height());
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (109:3): [True: 5.24M, False: 0]
  ------------------
  110|  5.24M|  invariant((croppedWidth == 0) == (croppedHeight == 0));
  ------------------
  |  |   27|  5.24M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (110:3): [True: 5.24M, False: 0]
  ------------------
  111|  5.24M|}
_ZN8rawspeed17CroppedArray2DRefItEC2ENS_10Array2DRefItEEiiii:
  118|  1.74M|    : base(base_), offsetCols(offsetCols_), offsetRows(offsetRows_),
  119|  1.74M|      croppedWidth(croppedWidth_), croppedHeight(croppedHeight_) {
  120|  1.74M|  establishClassInvariants();
  121|  1.74M|}
_ZNK8rawspeed17CroppedArray2DRefItEixEi:
  125|  1.74M|CroppedArray2DRef<T>::operator[](const int row) const {
  126|  1.74M|  establishClassInvariants();
  127|  1.74M|  invariant(row >= 0);
  ------------------
  |  |   27|  1.74M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (127:3): [True: 1.74M, False: 0]
  ------------------
  128|  1.74M|  invariant(row < croppedHeight);
  ------------------
  |  |   27|  1.74M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (128:3): [True: 1.74M, False: 0]
  ------------------
  129|  1.74M|  const Array1DRef<T> fullLine = base.operator[](offsetRows + row);
  130|  1.74M|  return fullLine.getCrop(offsetCols, croppedWidth);
  131|  1.74M|}
_ZNK8rawspeed17CroppedArray2DRefItE15getAsArray2DRefEv:
   79|  1.74M|  [[nodiscard]] Array2DRef<T> getAsArray2DRef() const {
   80|  1.74M|    establishClassInvariants();
   81|  1.74M|    return {operator[](0).begin(), croppedWidth, croppedHeight, base.pitch()};
   82|  1.74M|  }

_ZN8rawspeed27DefaultInitAllocatorAdaptorIhNS_16AlignedAllocatorIhLi16EEEE10deallocateEPhm:
   69|  2.87k|  void deallocate(T* p, std::size_t n) noexcept {
   70|  2.87k|    allocator_traits::deallocate(allocator, p, n);
   71|  2.87k|  }
_ZNK8rawspeed27DefaultInitAllocatorAdaptorIhNS_16AlignedAllocatorIhLi16EEEE9constructIhEEvPT_:
   75|  48.7G|      noexcept(std::is_nothrow_default_constructible_v<U>) {
   76|  48.7G|    ::new (static_cast<void*>(ptr)) U; // start the life-time, but do not init.
   77|  48.7G|  }
_ZN8rawspeed27DefaultInitAllocatorAdaptorIhNS_16AlignedAllocatorIhLi16EEEE8allocateEm:
   65|  2.87k|  T* allocate(std::size_t n) {
   66|  2.87k|    return allocator_traits::allocate(allocator, n);
   67|  2.87k|  }

_ZN8rawspeed5MutexC2Ev:
   40|  6.16k|  explicit Mutex() { omp_init_lock(&mutex); }
_ZN8rawspeed5MutexD2Ev:
   47|  6.16k|  ~Mutex() { omp_destroy_lock(&mutex); }

_ZNK8rawspeed8OptionalINS_10JpegMarkerEEcvbEv:
   89|  11.1M|  explicit operator bool() const { return has_value(); }
_ZNK8rawspeed8OptionalINS_10JpegMarkerEE9has_valueEv:
   85|  11.1M|  [[nodiscard]] bool has_value() const RAWSPEED_READNONE {
   86|  11.1M|    return impl.has_value();
   87|  11.1M|  }
_ZN8rawspeed8OptionalINS_10Array2DRefIiEEEC2Ev:
   35|  3.08k|  Optional() = default;
_ZN8rawspeed8OptionalIiEC2Ev:
   35|  3.08k|  Optional() = default;
_ZN8rawspeed8OptionalINSt3__15arrayIfLm4EEEEC2Ev:
   35|  3.08k|  Optional() = default;
_ZN8rawspeed8OptionalINS_10ByteStreamEEC2IS1_Qaaaaaantsr3stdE7same_asITL0__NS0_IT_EEEntsr3stdE7same_asIS4_RS7_Entsr3stdE7same_asIS4_OS7_Entsr3stdE7same_asIS4_NSt3__18optionalIS5_EEEEEOS5_:
   42|  10.4k|  Optional(U&& value) : impl(std::forward<U>(value)) {}
_ZN8rawspeed8OptionalINS_10ByteStreamEEC2IRKNSt3__19nullopt_tEQaaaaaantsr3stdE7same_asITL0__NS0_IT_EEEntsr3stdE7same_asIS8_RSB_Entsr3stdE7same_asIS8_OSB_Entsr3stdE7same_asIS8_NS4_8optionalIS9_EEEEEOS9_:
   42|    305|  Optional(U&& value) : impl(std::forward<U>(value)) {}
_ZNK8rawspeed8OptionalINS_10ByteStreamEEcvbEv:
   89|  10.7k|  explicit operator bool() const { return has_value(); }
_ZNK8rawspeed8OptionalINS_10ByteStreamEE9has_valueEv:
   85|  21.1k|  [[nodiscard]] bool has_value() const RAWSPEED_READNONE {
   86|  21.1k|    return impl.has_value();
   87|  21.1k|  }
_ZNR8rawspeed8OptionalINS_10ByteStreamEEdeEv:
   70|  10.4k|  T& operator*() & {
   71|  10.4k|    invariant(has_value());
  ------------------
  |  |   27|  10.4k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (71:5): [True: 10.4k, False: 0]
  ------------------
   72|  10.4k|    return impl.value();
   73|  10.4k|  }
_ZN8rawspeed8OptionalINS_10JpegMarkerEEC2IS1_Qaaaaaantsr3stdE7same_asITL0__NS0_IT_EEEntsr3stdE7same_asIS4_RS7_Entsr3stdE7same_asIS4_OS7_Entsr3stdE7same_asIS4_NSt3__18optionalIS5_EEEEEOS5_:
   42|  20.9k|  Optional(U&& value) : impl(std::forward<U>(value)) {}
_ZN8rawspeed8OptionalINS_10JpegMarkerEEC2Ev:
   35|  11.1M|  Optional() = default;
_ZNO8rawspeed8OptionalINS_10JpegMarkerEEdeEv:
   75|  10.4k|  T&& operator*() && {
   76|  10.4k|    invariant(has_value());
  ------------------
  |  |   27|  10.4k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (76:5): [True: 10.4k, False: 0]
  ------------------
   77|  10.4k|    return std::move(impl.value());
   78|  10.4k|  }
_ZN8rawspeed8OptionalIiEC2IiQaaaaaantsr3stdE7same_asITL0__NS0_IT_EEEntsr3stdE7same_asIS3_RS6_Entsr3stdE7same_asIS3_OS6_Entsr3stdE7same_asIS3_NSt3__18optionalIS4_EEEEEOS4_:
   42|    115|  Optional(U&& value) : impl(std::forward<U>(value)) {}
_ZN8rawspeed8OptionalIiEC2IRKNSt3__19nullopt_tEQaaaaaantsr3stdE7same_asITL0__NS0_IT_EEEntsr3stdE7same_asIS7_RSA_Entsr3stdE7same_asIS7_OSA_Entsr3stdE7same_asIS7_NS3_8optionalIS8_EEEEEOS8_:
   42|     15|  Optional(U&& value) : impl(std::forward<U>(value)) {}
_ZNR8rawspeed8OptionalINS_10JpegMarkerEEdeEv:
   70|    130|  T& operator*() & {
   71|    130|    invariant(has_value());
  ------------------
  |  |   27|    130|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (71:5): [True: 130, False: 0]
  ------------------
   72|    130|    return impl.value();
   73|    130|  }
_ZNK8rawspeed8OptionalIiEcvbEv:
   89|    130|  explicit operator bool() const { return has_value(); }
_ZNK8rawspeed8OptionalIiE9has_valueEv:
   85|    245|  [[nodiscard]] bool has_value() const RAWSPEED_READNONE {
   86|    245|    return impl.has_value();
   87|    245|  }
_ZNR8rawspeed8OptionalIiEdeEv:
   70|    115|  T& operator*() & {
   71|    115|    invariant(has_value());
  ------------------
  |  |   27|    115|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (71:5): [True: 115, False: 0]
  ------------------
   72|    115|    return impl.value();
   73|    115|  }

_ZN8rawspeed8iPoint2DC2Eii:
   41|  38.0k|  constexpr iPoint2D(value_type a, value_type b) : x(a), y(b) {}
_ZNK8rawspeed8iPoint2DeqERKS0_:
   59|  11.2k|  constexpr bool RAWSPEED_READONLY operator==(const iPoint2D& rhs) const {
   60|  11.2k|    return x == rhs.x && y == rhs.y;
  ------------------
  |  Branch (60:12): [True: 5.61k, False: 5.62k]
  |  Branch (60:26): [True: 4.79k, False: 819]
  ------------------
   61|  11.2k|  }
_ZNK8rawspeed8iPoint2DgtERKS0_:
   63|  13.3k|  constexpr bool RAWSPEED_READONLY operator>(const iPoint2D& rhs) const {
   64|  13.3k|    return x > rhs.x && y > rhs.y;
  ------------------
  |  Branch (64:12): [True: 13.2k, False: 62]
  |  Branch (64:25): [True: 13.1k, False: 66]
  ------------------
   65|  13.3k|  }
_ZNK8rawspeed8iPoint2D15hasPositiveAreaEv:
   77|  13.3k|  [[nodiscard]] bool RAWSPEED_READONLY hasPositiveArea() const {
   78|  13.3k|    return *this > iPoint2D(0, 0);
   79|  13.3k|  }
_ZNK8rawspeed8iPoint2D4areaEv:
   81|  17.4k|  [[nodiscard]] area_type RAWSPEED_READONLY area() const {
   82|  17.4k|    using signed_area = std::make_signed_t<area_type>;
   83|       |
   84|  17.4k|    area_type x_abs = std::abs(static_cast<signed_area>(x));
   85|  17.4k|    area_type y_abs = std::abs(static_cast<signed_area>(y));
   86|       |
   87|  17.4k|    return x_abs * y_abs;
   88|  17.4k|  }
_ZN8rawspeed12iRectangle2DC2ERKNS_8iPoint2DES3_:
  111|  1.71k|      : pos(pos_), dim(dim_) {}
_ZNK8rawspeed12iRectangle2D15hasPositiveAreaEv:
  131|  1.60k|  [[nodiscard]] constexpr bool RAWSPEED_READONLY hasPositiveArea() const {
  132|  1.60k|    return (dim.x > 0) && (dim.y > 0);
  ------------------
  |  Branch (132:12): [True: 1.60k, False: 0]
  |  Branch (132:27): [True: 1.60k, False: 0]
  ------------------
  133|  1.60k|  }
_ZN8rawspeed8iPoint2DC2Ev:
   40|  15.2k|  constexpr iPoint2D() = default;

_ZN8rawspeed32variableLengthLoadNaiveViaMemcpyENS_10Array1DRefISt4byteEENS0_IKS1_EEi:
  150|  6.36k|                                             int inPos) {
  151|  6.36k|  invariant(out.size() != 0);
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (151:3): [True: 6.36k, False: 0]
  ------------------
  152|  6.36k|  invariant(in.size() != 0);
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (152:3): [True: 6.36k, False: 0]
  ------------------
  153|  6.36k|  invariant(out.size() <= in.size());
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (153:3): [True: 6.36k, False: 0]
  ------------------
  154|  6.36k|  invariant(inPos >= 0);
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (154:3): [True: 6.36k, False: 0]
  ------------------
  155|       |
  156|  6.36k|  std::fill(out.begin(), out.end(), std::byte{0x00});
  157|       |
  158|  6.36k|  inPos = std::min(inPos, in.size());
  159|       |
  160|  6.36k|  int inPosEnd = inPos + out.size();
  161|  6.36k|  inPosEnd = std::min(inPosEnd, in.size());
  162|  6.36k|  invariant(inPos <= inPosEnd);
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (162:3): [True: 6.36k, False: 0]
  ------------------
  163|       |
  164|  6.36k|  const int copySize = inPosEnd - inPos;
  165|  6.36k|  invariant(copySize >= 0);
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (165:3): [True: 6.36k, False: 0]
  ------------------
  166|  6.36k|  invariant(copySize <= out.size());
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (166:3): [True: 6.36k, False: 0]
  ------------------
  167|       |
  168|  6.36k|  out = out.getCrop(/*offset=*/0, copySize).getAsArray1DRef();
  169|  6.36k|  in = in.getCrop(/*offset=*/inPos, copySize).getAsArray1DRef();
  170|  6.36k|  invariant(in.size() == out.size());
  ------------------
  |  |   27|  6.36k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (170:3): [True: 6.36k, False: 0]
  ------------------
  171|       |
  172|  6.36k|  memcpy(out.begin(), in.begin(), copySize);
  173|  6.36k|}

_ZN8rawspeed28BitStreamCacheRightInLeftOut4pushEmi:
   93|  3.63M|  void push(uint64_t bits, int count) noexcept {
   94|  3.63M|    establishClassInvariants();
   95|  3.63M|    invariant(count >= 0);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (95:5): [True: 3.63M, False: 0]
  ------------------
   96|       |    // NOTE: count may be zero!
   97|  3.63M|    invariant(count <= Size);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (97:5): [True: 3.63M, False: 0]
  ------------------
   98|  3.63M|    invariant(count + fillLevel <= Size);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:5): [True: 3.63M, False: 0]
  ------------------
   99|       |    // If the maximal size of the cache is BitStreamCacheBase::Size, and we
  100|       |    // have fillLevel [high] bits set, how many empty [low] bits do we have?
  101|  3.63M|    const int vacantBits = BitStreamCacheBase::Size - fillLevel;
  102|  3.63M|    invariant(vacantBits >= 0);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (102:5): [True: 3.63M, False: 0]
  ------------------
  103|  3.63M|    invariant(vacantBits <= Size);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (103:5): [True: 3.63M, False: 0]
  ------------------
  104|  3.63M|    invariant(vacantBits != 0);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (104:5): [True: 3.63M, False: 0]
  ------------------
  105|  3.63M|    invariant(vacantBits >= count);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (105:5): [True: 3.63M, False: 0]
  ------------------
  106|       |    // If we just directly 'or' these low bits into the cache right now,
  107|       |    // how many unfilled bits of a gap will there be in the middle of a cache?
  108|  3.63M|    const int emptyBitsGap = vacantBits - count;
  109|  3.63M|    invariant(emptyBitsGap >= 0);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (109:5): [True: 3.63M, False: 0]
  ------------------
  110|  3.63M|    invariant(emptyBitsGap <= Size);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (110:5): [True: 3.63M, False: 0]
  ------------------
  111|  3.63M|    if (count != 0) {
  ------------------
  |  Branch (111:9): [True: 3.63M, False: 0]
  ------------------
  112|  3.63M|      invariant(emptyBitsGap < Size);
  ------------------
  |  |   27|  3.63M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (112:7): [True: 3.63M, False: 0]
  ------------------
  113|       |      // So just shift the new bits so that there is no gap in the middle.
  114|  3.63M|      cache |= bits << emptyBitsGap;
  115|  3.63M|    }
  116|  3.63M|    fillLevel += count;
  117|  3.63M|  }
_ZNK8rawspeed28BitStreamCacheRightInLeftOut4peekEi:
  119|  40.5M|  [[nodiscard]] auto peek(int count) const noexcept {
  120|  40.5M|    establishClassInvariants();
  121|  40.5M|    invariant(count >= 0);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (121:5): [True: 40.5M, False: 0]
  ------------------
  122|  40.5M|    invariant(count <= Size);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (122:5): [True: 40.5M, False: 0]
  ------------------
  123|  40.5M|    invariant(count <= MaxGetBits);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (123:5): [True: 40.5M, False: 0]
  ------------------
  124|  40.5M|    invariant(count != 0);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (124:5): [True: 40.5M, False: 0]
  ------------------
  125|  40.5M|    invariant(count <= fillLevel);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (125:5): [True: 40.5M, False: 0]
  ------------------
  126|  40.5M|    return implicit_cast<uint32_t>(
  127|  40.5M|        extractHighBits(cache, count,
  128|  40.5M|                        /*effectiveBitwidth=*/BitStreamCacheBase::Size));
  129|  40.5M|  }
_ZN8rawspeed28BitStreamCacheRightInLeftOut4skipEi:
  131|  40.6M|  void skip(int count) noexcept {
  132|  40.6M|    establishClassInvariants();
  133|  40.6M|    invariant(count >= 0);
  ------------------
  |  |   27|  40.6M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (133:5): [True: 40.6M, False: 0]
  ------------------
  134|       |    // `count` *could* be larger than `MaxGetBits`.
  135|       |    // `count` could be zero.
  136|  40.6M|    invariant(count <= Size);
  ------------------
  |  |   27|  40.6M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (136:5): [True: 40.6M, False: 0]
  ------------------
  137|  40.6M|    invariant(count <= fillLevel);
  ------------------
  |  |   27|  40.6M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (137:5): [True: 40.6M, False: 0]
  ------------------
  138|  40.6M|    fillLevel -= count;
  139|  40.6M|    cache <<= count;
  140|  40.6M|  }
_ZNK8rawspeed18BitStreamCacheBase24establishClassInvariantsEv:
   54|   210M|BitStreamCacheBase::establishClassInvariants() const noexcept {
   55|   210M|  invariant(fillLevel >= 0);
  ------------------
  |  |   27|   210M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (55:3): [True: 210M, False: 0]
  ------------------
   56|   210M|  invariant(fillLevel <= Size);
  ------------------
  |  |   27|   210M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (56:3): [True: 210M, False: 0]
  ------------------
   57|   210M|}

_ZNK8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEE24establishClassInvariantsEv:
  185|   125M|  void establishClassInvariants() const noexcept {
  186|   125M|    cache.establishClassInvariants();
  187|   125M|    replenisher.establishClassInvariants();
  188|   125M|  }
_ZNK8rawspeed26BitStreamerReplenisherBaseINS_15BitStreamerJPEGEE24establishClassInvariantsEv:
   65|   139M|BitStreamerReplenisherBase<Tag>::establishClassInvariants() const noexcept {
   66|   139M|  input.establishClassInvariants();
   67|   139M|  invariant(input.size() >= BitStreamerTraits<Tag>::MaxProcessBytes);
  ------------------
  |  |   27|   139M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (67:3): [True: 139M, False: 0]
  ------------------
   68|   139M|  invariant(pos >= 0);
  ------------------
  |  |   27|   139M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (68:3): [True: 139M, False: 0]
  ------------------
   69|   139M|  invariant(pos % StreamTraits::MinLoadStepByteMultiple == 0);
  ------------------
  |  |   27|   139M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (69:3): [True: 139M, False: 0]
  ------------------
   70|       |  // `pos` *could* be out-of-bounds of `input`.
   71|   139M|}
_ZNK8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEE16getInputPositionEv:
  232|  1.11k|  [[nodiscard]] size_type RAWSPEED_READONLY getInputPosition() const {
  233|  1.11k|    establishClassInvariants();
  234|  1.11k|    return replenisher.getPos();
  235|  1.11k|  }
_ZNK8rawspeed39BitStreamerForwardSequentialReplenisherINS_15BitStreamerJPEGEE6getPosEv:
   84|  7.24M|  [[nodiscard]] typename Base::size_type getPos() const {
   85|  7.24M|    Base::establishClassInvariants();
   86|  7.24M|    return Base::pos;
   87|  7.24M|  }
_ZNK8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEE16getRemainingSizeEv:
  243|    801|  [[nodiscard]] size_type getRemainingSize() const {
  244|    801|    establishClassInvariants();
  245|    801|    return replenisher.getRemainingSize();
  246|    801|  }
_ZNK8rawspeed39BitStreamerForwardSequentialReplenisherINS_15BitStreamerJPEGEE16getRemainingSizeEv:
   88|    801|  [[nodiscard]] typename Base::size_type getRemainingSize() const {
   89|    801|    Base::establishClassInvariants();
   90|    801|    return Base::input.size() - getPos();
   91|    801|  }
_ZN8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEEC2ENS_10Array1DRefIKSt4byteEE:
  192|  1.70k|  explicit BitStreamer(Array1DRef<const std::byte> input) : replenisher(input) {
  193|  1.70k|    establishClassInvariants();
  194|  1.70k|  }
_ZN8rawspeed26BitStreamerReplenisherBaseINS_15BitStreamerJPEGEEC2ENS_10Array1DRefIKSt4byteEE:
   57|  1.70k|      : input(input_) {
   58|  1.70k|    if (input.size() < BitStreamerTraits<Tag>::MaxProcessBytes)
  ------------------
  |  Branch (58:9): [True: 144, False: 1.55k]
  ------------------
   59|  1.70k|      ThrowIOE("Bit stream size is smaller than MaxProcessBytes");
  ------------------
  |  |   37|    144|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    144|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    144|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    144|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   60|  1.70k|  }
_ZN8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEE4fillEi:
  216|  37.3M|  void fill(int nbits = Cache::MaxGetBits) {
  217|  37.3M|    establishClassInvariants();
  218|  37.3M|    invariant(nbits >= 0);
  ------------------
  |  |   27|  37.3M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (218:5): [True: 37.3M, False: 0]
  ------------------
  219|  37.3M|    invariant(nbits != 0);
  ------------------
  |  |   27|  37.3M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (219:5): [True: 37.3M, False: 0]
  ------------------
  220|  37.3M|    invariant(nbits <= Cache::MaxGetBits);
  ------------------
  |  |   27|  37.3M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (220:5): [True: 37.3M, False: 0]
  ------------------
  221|       |
  222|  37.3M|    if (cache.fillLevel >= nbits)
  ------------------
  |  Branch (222:9): [True: 33.7M, False: 3.61M]
  ------------------
  223|  33.7M|      return;
  224|       |
  225|  3.61M|    const auto input = replenisher.getInput();
  226|  3.61M|    const auto numBytes = static_cast<Derived*>(this)->fillCache(input);
  227|  3.61M|    replenisher.markNumBytesAsConsumed(numBytes);
  228|       |    invariant(cache.fillLevel >= nbits);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (228:5): [True: 3.61M, False: 1.04k]
  ------------------
  229|  3.61M|  }
_ZN8rawspeed39BitStreamerForwardSequentialReplenisherINS_15BitStreamerJPEGEE8getInputEv:
  100|  3.61M|  std::array<std::byte, BitStreamerTraits<Tag>::MaxProcessBytes> getInput() {
  101|  3.61M|    Base::establishClassInvariants();
  102|       |
  103|  3.61M|    std::array<std::byte, BitStreamerTraits<Tag>::MaxProcessBytes> tmpStorage;
  104|  3.61M|    auto tmp = Array1DRef<std::byte>(tmpStorage.data(),
  105|  3.61M|                                     implicit_cast<int>(tmpStorage.size()));
  106|       |
  107|       |    // Do we have BitStreamerTraits<Tag>::MaxProcessBytes or more bytes left in
  108|       |    // the input buffer? If so, then we can just read from said buffer.
  109|  3.61M|    if (getPos() + BitStreamerTraits<Tag>::MaxProcessBytes <=
  ------------------
  |  Branch (109:9): [True: 3.60M, False: 7.41k]
  ------------------
  110|  3.61M|        Base::input.size()) [[likely]] {
  111|  3.60M|      auto currInput =
  112|  3.60M|          Base::input.getCrop(getPos(), BitStreamerTraits<Tag>::MaxProcessBytes)
  113|  3.60M|              .getAsArray1DRef();
  114|  3.60M|      invariant(currInput.size() == tmp.size());
  ------------------
  |  |   27|  3.60M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (114:7): [True: 3.60M, False: 0]
  ------------------
  115|  3.60M|      memcpy(tmp.begin(), currInput.begin(),
  116|  3.60M|             BitStreamerTraits<Tag>::MaxProcessBytes);
  117|  3.60M|      return tmpStorage;
  118|  3.60M|    }
  119|       |
  120|       |    // We have to use intermediate buffer, either because the input is running
  121|       |    // out of bytes, or because we want to enforce bounds checking.
  122|       |
  123|       |    // Note that in order to keep all fill-level invariants we must allow to
  124|       |    // over-read past-the-end a bit.
  125|  7.41k|    if (getPos() > Base::input.size() +
  ------------------
  |  Branch (125:9): [True: 1.04k, False: 6.36k]
  ------------------
  126|  7.41k|                       2 * BitStreamerTraits<Tag>::MaxProcessBytes) [[unlikely]]
  127|  1.04k|      ThrowIOE("Buffer overflow read in BitStreamer");
  ------------------
  |  |   37|  1.04k|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  1.04k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  1.04k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  1.04k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  128|       |
  129|  6.36k|    variableLengthLoadNaiveViaMemcpy(tmp, Base::input, getPos());
  130|       |
  131|  6.36k|    return tmpStorage;
  132|  7.41k|  }
_ZN8rawspeed39BitStreamerForwardSequentialReplenisherINS_15BitStreamerJPEGEE22markNumBytesAsConsumedEi:
   92|  3.61M|  void markNumBytesAsConsumed(typename Base::size_type numBytes) {
   93|  3.61M|    Base::establishClassInvariants();
   94|  3.61M|    invariant(numBytes >= 0);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (94:5): [True: 3.61M, False: 0]
  ------------------
   95|  3.61M|    invariant(numBytes != 0);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (95:5): [True: 3.61M, False: 0]
  ------------------
   96|  3.61M|    invariant(numBytes % StreamTraits::MinLoadStepByteMultiple == 0);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (96:5): [True: 3.61M, False: 0]
  ------------------
   97|  3.61M|    Base::pos += numBytes;
   98|  3.61M|  }
_ZN8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEE14peekBitsNoFillEi:
  253|  40.5M|  uint32_t RAWSPEED_READONLY peekBitsNoFill(int nbits) {
  254|  40.5M|    establishClassInvariants();
  255|  40.5M|    invariant(nbits >= 0);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (255:5): [True: 40.5M, False: 0]
  ------------------
  256|  40.5M|    invariant(nbits != 0);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (256:5): [True: 40.5M, False: 0]
  ------------------
  257|  40.5M|    invariant(nbits <= Cache::MaxGetBits);
  ------------------
  |  |   27|  40.5M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (257:5): [True: 40.5M, False: 0]
  ------------------
  258|  40.5M|    return cache.peek(nbits);
  259|  40.5M|  }
_ZN8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEE14skipBitsNoFillEi:
  261|  40.6M|  void skipBitsNoFill(int nbits) {
  262|  40.6M|    establishClassInvariants();
  263|  40.6M|    invariant(nbits >= 0);
  ------------------
  |  |   27|  40.6M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (263:5): [True: 40.6M, False: 0]
  ------------------
  264|       |    // `nbits` could be zero.
  265|  40.6M|    invariant(nbits <= Cache::MaxGetBits);
  ------------------
  |  |   27|  40.6M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (265:5): [True: 40.6M, False: 0]
  ------------------
  266|  40.6M|    cache.skip(nbits);
  267|  40.6M|  }
_ZN8rawspeed11BitStreamerINS_15BitStreamerJPEGENS_39BitStreamerForwardSequentialReplenisherIS1_EEE13getBitsNoFillEi:
  269|  3.19M|  uint32_t getBitsNoFill(int nbits) {
  270|  3.19M|    establishClassInvariants();
  271|  3.19M|    invariant(nbits >= 0);
  ------------------
  |  |   27|  3.19M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (271:5): [True: 3.19M, False: 0]
  ------------------
  272|  3.19M|    invariant(nbits != 0);
  ------------------
  |  |   27|  3.19M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (272:5): [True: 3.19M, False: 0]
  ------------------
  273|  3.19M|    invariant(nbits <= Cache::MaxGetBits);
  ------------------
  |  |   27|  3.19M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (273:5): [True: 3.19M, False: 0]
  ------------------
  274|  3.19M|    uint32_t ret = peekBitsNoFill(nbits);
  275|  3.19M|    skipBitsNoFill(nbits);
  276|  3.19M|    return ret;
  277|  3.19M|  }

_ZN8rawspeed15BitStreamerJPEG9fillCacheENSt3__15arrayISt4byteLm8EEE:
  108|  3.61M|        inputStorage) {
  109|  3.61M|  static_assert(BitStreamCacheBase::MaxGetBits >= 32, "check implementation");
  110|  3.61M|  establishClassInvariants();
  111|  3.61M|  auto input = Array1DRef<std::byte>(inputStorage.data(),
  112|  3.61M|                                     implicit_cast<int>(inputStorage.size()));
  113|  3.61M|  invariant(input.size() == Traits::MaxProcessBytes);
  ------------------
  |  |   27|  3.61M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (113:3): [True: 3.61M, False: 0]
  ------------------
  114|       |
  115|  3.61M|  constexpr int StreamChunkBitwidth =
  116|  3.61M|      bitwidth<typename StreamTraits::ChunkType>();
  117|       |
  118|  3.61M|  auto speculativeOptimisticCache = cache;
  119|  3.61M|  auto speculativeOptimisticChunk =
  120|  3.61M|      getByteSwapped<typename StreamTraits::ChunkType>(
  121|  3.61M|          input.begin(), StreamTraits::ChunkEndianness != getHostEndianness());
  122|  3.61M|  speculativeOptimisticCache.push(speculativeOptimisticChunk,
  123|  3.61M|                                  StreamChunkBitwidth);
  124|       |
  125|       |  // short-cut path for the most common case (no FF marker in the next 4 bytes)
  126|       |  // this is slightly faster than the else-case alone.
  127|  3.61M|  if (std::accumulate(&input(0), &input(4), true, [](bool b, std::byte byte) {
  ------------------
  |  Branch (127:7): [True: 3.61M, False: 5.35k]
  ------------------
  128|  3.61M|        return b && (byte != std::byte{0xFF});
  129|  3.61M|      })) {
  130|  3.61M|    cache = speculativeOptimisticCache;
  131|  3.61M|    return 4;
  132|  3.61M|  }
  133|       |
  134|  5.35k|  size_type p = 0;
  135|  24.2k|  for (size_type i = 0; i < 4; ++i) {
  ------------------
  |  Branch (135:25): [True: 19.6k, False: 4.55k]
  ------------------
  136|  19.6k|    const int numBytesNeeded = 4 - i;
  137|       |
  138|       |    // Pre-execute most common case, where next byte is 'normal'/non-FF
  139|  19.6k|    const std::byte c0 = input(p + 0);
  140|  19.6k|    cache.push(std::to_integer<uint8_t>(c0), 8);
  141|  19.6k|    if (c0 != std::byte{0xFF}) {
  ------------------
  |  Branch (141:9): [True: 12.5k, False: 7.16k]
  ------------------
  142|  12.5k|      p += 1;
  143|  12.5k|      continue; // Got normal byte.
  144|  12.5k|    }
  145|       |
  146|       |    // Found FF -> pre-execute case of FF/00, which represents an FF data byte
  147|  7.16k|    const std::byte c1 = input(p + 1);
  148|  7.16k|    if (c1 == std::byte{0x00}) {
  ------------------
  |  Branch (148:9): [True: 6.35k, False: 801]
  ------------------
  149|       |      // Got FF/00, where 0x00 is a stuffing byte (that should be ignored),
  150|       |      // so 0xFF is a normal byte. All good.
  151|  6.35k|      p += 2;
  152|  6.35k|      continue;
  153|  6.35k|    }
  154|       |
  155|       |    // Found FF/xx with xx != 00. This is the end of stream marker.
  156|    801|    endOfStreamPos = getInputPosition() + p;
  157|       |
  158|       |    // That means we shouldn't have pushed last 8 bits (0xFF, from c0).
  159|       |    // We need to "unpush" them, and fill the vacant cache bits with zeros.
  160|       |
  161|       |    // First, recover the cache fill level.
  162|    801|    cache.fillLevel -= 8;
  163|       |    // Now, this code is incredibly underencapsulated, and the
  164|       |    // implementation details are leaking into here. Thus, we know that
  165|       |    // all the fillLevel bits in cache are all high bits. So to "unpush"
  166|       |    // the last 8 bits, and fill the vacant cache bits with zeros, we only
  167|       |    // need to keep the high fillLevel bits. So just create a mask with only
  168|       |    // high fillLevel bits set, and 'and' the cache with it.
  169|       |    // Caution, we know fillLevel won't be 64, but it may be 0,
  170|       |    // so pick the mask-creation idiom accordingly.
  171|    801|    cache.cache &= ~((~0ULL) >> cache.fillLevel);
  172|    801|    cache.fillLevel = 64;
  173|       |
  174|       |    // No further reading from this buffer shall happen. Do signal that by
  175|       |    // claiming that we have consumed all the remaining bytes of the buffer.
  176|       |
  177|    801|    p = getRemainingSize() + numBytesNeeded;
  178|    801|    invariant(p >= 6);
  ------------------
  |  |   27|    801|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (178:5): [True: 801, False: 0]
  ------------------
  179|    801|    break;
  180|    801|  }
  181|  5.35k|  invariant(p >= 5);
  ------------------
  |  |   27|  5.35k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (181:3): [True: 5.35k, False: 0]
  ------------------
  182|  5.35k|  return p;
  183|  5.35k|}
_ZNK8rawspeed15BitStreamerJPEG17getStreamPositionEv:
  185|    312|inline BitStreamerJPEG::size_type BitStreamerJPEG::getStreamPosition() const {
  186|       |  // The current number of bytes we consumed.
  187|       |  // When at the end of the stream pos, it points to the JPEG marker FF
  188|    312|  return endOfStreamPos.value_or(getInputPosition());
  189|    312|}
_ZN8rawspeed12PosOrUnknownIiEaSIiQsr3stdE7same_asITL0__T_EEERS1_S4_:
   52|    801|  PosOrUnknown& operator=(U newValue) {
   53|    801|    invariant(!has_value());
  ------------------
  |  |   27|    801|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (53:5): [True: 801, False: 0]
  ------------------
   54|    801|    val = newValue;
   55|    801|    invariant(has_value());
  ------------------
  |  |   27|    801|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (55:5): [True: 801, False: 0]
  ------------------
   56|    801|    return *this;
   57|    801|  }
_ZNK8rawspeed12PosOrUnknownIiE9has_valueEv:
   48|  1.91k|  [[nodiscard]] bool has_value() const RAWSPEED_READONLY { return val >= 0; }
_ZNK8rawspeed12PosOrUnknownIiE8value_orIiQsr3stdE7same_asITL0__T_EEEiS4_:
   61|    312|  [[nodiscard]] T value_or(U fallback) const {
   62|    312|    if (has_value())
  ------------------
  |  Branch (62:9): [True: 223, False: 89]
  ------------------
   63|    223|      return val;
   64|     89|    return fallback;
   65|    312|  }
_ZN8rawspeed12PosOrUnknownIiEC2Ev:
   46|  1.55k|  PosOrUnknown() = default;
_ZZN8rawspeed15BitStreamerJPEG9fillCacheENSt3__15arrayISt4byteLm8EEEENKUlbS3_E_clEbS3_:
  127|  14.4M|  if (std::accumulate(&input(0), &input(4), true, [](bool b, std::byte byte) {
  128|  14.4M|        return b && (byte != std::byte{0xFF});
  ------------------
  |  Branch (128:16): [True: 14.4M, False: 9.77k]
  |  Branch (128:21): [True: 14.4M, False: 5.35k]
  ------------------
  129|  14.4M|      })) {

_ZN8rawspeed18AbstractPrefixCodeINS_15BaselineCodeTagEEC2Ev:
  178|  2.47k|  AbstractPrefixCode() = default;
_ZN8rawspeed18AbstractPrefixCodeINS_15BaselineCodeTagEE10CodeSymbolC2Eth:
  151|  10.6k|        : code(code_), code_len(code_len_) {
  152|  10.6k|      assert(code_len > 0);
  ------------------
  |  Branch (152:7): [True: 10.6k, False: 0]
  ------------------
  153|  10.6k|      assert(code_len <= Traits::MaxCodeLenghtBits);
  ------------------
  |  Branch (153:7): [True: 10.6k, False: 0]
  ------------------
  154|  10.6k|      assert(code <= ((1U << code_len) - 1U));
  ------------------
  |  Branch (154:7): [True: 10.6k, False: 0]
  ------------------
  155|  10.6k|    }
_ZN8rawspeed18AbstractPrefixCodeINS_15BaselineCodeTagEEC2ENSt3__16vectorIhNS3_9allocatorIhEEEE:
  181|  2.39k|      : codeValues(std::move(codeValues_)) {
  182|  2.39k|    if (codeValues.empty())
  ------------------
  |  Branch (182:9): [True: 0, False: 2.39k]
  ------------------
  183|  2.39k|      ThrowRDE("Empty code alphabet?");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  184|  2.39k|    assert(
  ------------------
  |  Branch (184:5): [True: 2.39k, False: 0]
  ------------------
  185|  2.39k|        all_of(codeValues.begin(), codeValues.end(),
  186|  2.39k|               [](const CodeValueTy& v) { return v <= Traits::MaxCodeValue; }));
  187|  2.39k|  }
_ZN8rawspeed18AbstractPrefixCodeINS_15BaselineCodeTagEE10CodeSymbol16HaveCommonPrefixERKS3_S5_:
  163|  34.5k|                                 const CodeSymbol& partial) {
  164|  34.5k|      assert(partial.code_len <= symbol.code_len);
  ------------------
  |  Branch (164:7): [True: 34.5k, False: 0]
  ------------------
  165|       |
  166|  34.5k|      const auto s0 = extractHighBits(symbol.code, partial.code_len,
  167|  34.5k|                                      /*effectiveBitwidth=*/symbol.code_len);
  168|  34.5k|      const auto s1 = partial.code;
  169|       |
  170|  34.5k|      return s0 == s1;
  171|  34.5k|    }

_ZN8rawspeed25AbstractPrefixCodeDecoderINS_15BaselineCodeTagEE6extendEjj:
   70|  3.60M|  static int RAWSPEED_READNONE extend(uint32_t diff, uint32_t len) {
   71|  3.60M|    invariant(len > 0);
  ------------------
  |  |   27|  3.60M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (71:5): [True: 3.60M, False: 0]
  ------------------
   72|  3.60M|    auto ret = static_cast<int32_t>(diff);
   73|  3.60M|    if ((diff & (1 << (len - 1))) == 0)
  ------------------
  |  Branch (73:9): [True: 1.01M, False: 2.58M]
  ------------------
   74|  1.01M|      ret -= (1 << len) - 1;
   75|  3.60M|    return ret;
   76|  3.60M|  }
_ZNK8rawspeed25AbstractPrefixCodeDecoderINS_15BaselineCodeTagEE13processSymbolINS_15BitStreamerJPEGELb1EEEiRT_NS_18AbstractPrefixCodeIS1_E10CodeSymbolEh:
   45|  3.17M|                    typename Traits::CodeValueTy codeValue) const {
   46|  3.17M|    invariant(symbol.code_len >= 0 &&
  ------------------
  |  |   27|  3.17M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (46:5): [True: 3.17M, False: 0]
  |  Branch (46:5): [True: 3.17M, False: 0]
  |  Branch (46:5): [True: 3.17M, False: 0]
  ------------------
   47|  3.17M|              symbol.code_len <= Traits::MaxCodeLenghtBits);
   48|       |
   49|       |    // If we were only looking for symbol's code value, then just return it.
   50|       |    if constexpr (!FULL_DECODE)
   51|       |      return codeValue;
   52|       |
   53|       |    // Else, treat it as the length of following difference
   54|       |    // that we need to read and extend.
   55|  3.17M|    int diff_l = codeValue;
   56|  3.17M|    invariant(diff_l >= 0 && diff_l <= 16);
  ------------------
  |  |   27|  3.17M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (56:5): [True: 3.17M, False: 0]
  |  Branch (56:5): [True: 3.17M, False: 0]
  |  Branch (56:5): [True: 3.17M, False: 0]
  ------------------
   57|       |
   58|  3.17M|    if (diff_l == 16) {
  ------------------
  |  Branch (58:9): [True: 75.8k, False: 3.10M]
  ------------------
   59|  75.8k|      if (Base::handleDNGBug16())
  ------------------
  |  Branch (59:11): [True: 28.7k, False: 47.1k]
  ------------------
   60|  28.7k|        bs.skipBitsNoFill(16);
   61|  75.8k|      return -32768;
   62|  75.8k|    }
   63|       |
   64|  3.10M|    invariant(symbol.code_len + diff_l <= 32);
  ------------------
  |  |   27|  3.10M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (64:5): [True: 3.10M, False: 0]
  ------------------
   65|  3.10M|    return diff_l ? extend(bs.getBitsNoFill(diff_l), diff_l) : 0;
  ------------------
  |  Branch (65:12): [True: 3.07M, False: 22.0k]
  ------------------
   66|  3.10M|  }

_ZN8rawspeed28AbstractPrefixCodeTranscoderINS_15BaselineCodeTagEEC2ENS_10PrefixCodeIS1_EE:
   48|  2.39k|      : code(std::move(code_)) {}
_ZN8rawspeed28AbstractPrefixCodeTranscoderINS_15BaselineCodeTagEE5setupEbb:
   71|  2.39k|  void setup(bool fullDecode_, bool fixDNGBug16_) {
   72|  2.39k|    invariant(!fullDecode_ || Traits::SupportsFullDecode);
  ------------------
  |  |   27|  2.39k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (72:5): [True: 0, False: 2.39k]
  |  Branch (72:5): [True: 2.39k, Folded]
  |  Branch (72:5): [True: 2.39k, False: 0]
  ------------------
   73|       |
   74|  2.39k|    this->fullDecode = fullDecode_;
   75|  2.39k|    this->fixDNGBug16 = fixDNGBug16_;
   76|       |
   77|  2.39k|    if (fullDecode) {
  ------------------
  |  Branch (77:9): [True: 2.39k, False: 0]
  ------------------
   78|       |      // If we are in a full-decoding mode, we will be interpreting code values
   79|       |      // as bit length of the following difference, which incurs hard limit
   80|       |      // of 16 (since we want to need to read at most 32 bits max for a symbol
   81|       |      // plus difference). Though we could enforce it per-code instead?
   82|  2.39k|      verifyCodeValuesAsDiffLengths();
   83|  2.39k|    }
   84|  2.39k|  }
_ZNK8rawspeed28AbstractPrefixCodeTranscoderINS_15BaselineCodeTagEE29verifyCodeValuesAsDiffLengthsEv:
   50|  2.39k|  void verifyCodeValuesAsDiffLengths() const {
   51|  10.3k|    for (const auto cValue : code.Base::codeValues) {
  ------------------
  |  Branch (51:28): [True: 10.3k, False: 2.27k]
  ------------------
   52|  10.3k|      if (cValue <= Traits::MaxDiffLength)
  ------------------
  |  Branch (52:11): [True: 10.1k, False: 121]
  ------------------
   53|  10.1k|        continue;
   54|  10.3k|      ThrowRDE("Corrupt Huffman code: difference length %u longer than %u",
  ------------------
  |  |   38|    121|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    121|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    121|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    121|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   55|  10.3k|               cValue, Traits::MaxDiffLength);
   56|  10.3k|    }
   57|  2.39k|    assert(maxCodePlusDiffLength() <= 32U);
  ------------------
  |  Branch (57:5): [True: 2.27k, False: 0]
  ------------------
   58|  2.27k|  }
_ZNK8rawspeed28AbstractPrefixCodeTranscoderINS_15BaselineCodeTagEE21maxCodePlusDiffLengthEv:
   66|  2.27k|  maxCodePlusDiffLength() const {
   67|  2.27k|    return maxCodeLength() + *(std::max_element(code.Base::codeValues.cbegin(),
   68|  2.27k|                                                code.Base::codeValues.cend()));
   69|  2.27k|  }
_ZNK8rawspeed28AbstractPrefixCodeTranscoderINS_15BaselineCodeTagEE13maxCodeLengthEv:
   61|   351k|  [[nodiscard]] size_t RAWSPEED_READONLY maxCodeLength() const {
   62|   351k|    return code.nCodesPerLength.size() - 1;
   63|   351k|  }
_ZNK8rawspeed28AbstractPrefixCodeTranscoderINS_15BaselineCodeTagEE12isFullDecodeEv:
   87|  78.3M|  [[nodiscard]] bool RAWSPEED_READONLY isFullDecode() const {
   88|  78.3M|    return fullDecode;
   89|  78.3M|  }
_ZNK8rawspeed28AbstractPrefixCodeTranscoderINS_15BaselineCodeTagEE14handleDNGBug16Ev:
   90|   184k|  [[nodiscard]] bool RAWSPEED_READONLY handleDNGBug16() const {
   91|   184k|    return fixDNGBug16;
   92|   184k|  }

_ZN8rawspeed11HuffmanCodeINS_15BaselineCodeTagEEC2Ev:
   48|  2.47k|  HuffmanCode() = default;
_ZN8rawspeed11HuffmanCodeINS_15BaselineCodeTagEE18setNCodesPerLengthENS_6BufferE:
   99|  2.45k|  uint32_t setNCodesPerLength(Buffer data) {
  100|  2.45k|    invariant(data.getSize() == Traits::MaxCodeLenghtBits);
  ------------------
  |  |   27|  2.45k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:5): [True: 2.45k, False: 0]
  ------------------
  101|       |
  102|  2.45k|    nCodesPerLength.resize((1 + Traits::MaxCodeLenghtBits), 0);
  103|  2.45k|    std::copy(data.begin(), data.end(), &nCodesPerLength[1]);
  104|  2.45k|    assert(nCodesPerLength[0] == 0);
  ------------------
  |  Branch (104:5): [True: 2.45k, False: 0]
  ------------------
  105|       |
  106|       |    // trim empty entries from the codes per length table on the right
  107|  15.4k|    while (!nCodesPerLength.empty() && nCodesPerLength.back() == 0)
  ------------------
  |  Branch (107:12): [True: 15.4k, False: 3]
  |  Branch (107:40): [True: 12.9k, False: 2.45k]
  ------------------
  108|  12.9k|      nCodesPerLength.pop_back();
  109|       |
  110|  2.45k|    if (nCodesPerLength.empty())
  ------------------
  |  Branch (110:9): [True: 3, False: 2.45k]
  ------------------
  111|  2.45k|      ThrowRDE("Codes-per-length table is empty");
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  112|       |
  113|  2.45k|    assert(nCodesPerLength.back() > 0);
  ------------------
  |  Branch (113:5): [True: 2.45k, False: 0]
  ------------------
  114|       |
  115|  2.45k|    const auto count = maxCodesCount();
  116|  2.45k|    invariant(count > 0);
  ------------------
  |  |   27|  2.45k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (116:5): [True: 2.45k, False: 0]
  ------------------
  117|       |
  118|  2.45k|    if (count > Traits::MaxNumCodeValues)
  ------------------
  |  Branch (118:9): [True: 11, False: 2.44k]
  ------------------
  119|  2.45k|      ThrowRDE("Too big code-values table");
  ------------------
  |  |   38|     11|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     11|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     11|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     11|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  120|       |
  121|       |    // We are at the Root node, len is 1, there are two possible child Nodes
  122|  2.44k|    unsigned maxCodes = 2;
  123|       |
  124|  28.4k|    for (auto codeLen = 1UL; codeLen < nCodesPerLength.size(); codeLen++) {
  ------------------
  |  Branch (124:30): [True: 26.0k, False: 2.42k]
  ------------------
  125|       |      // we have codeLen bits. make sure that that code count can actually fit
  126|       |      // E.g. for len 1 we could have two codes: 0b0 and 0b1
  127|       |      // (but in that case there can be no other codes (with higher lengths))
  128|  26.0k|      const auto maxCodesInCurrLen = (1U << codeLen);
  129|  26.0k|      const auto nCodes = nCodesPerLength[codeLen];
  130|  26.0k|      if (nCodes > maxCodesInCurrLen) {
  ------------------
  |  Branch (130:11): [True: 12, False: 26.0k]
  ------------------
  131|     12|        ThrowRDE("Corrupt Huffman. Can never have %u codes in %lu-bit len",
  ------------------
  |  |   38|     12|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     12|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     12|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     12|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  132|     12|                 nCodes, codeLen);
  133|     12|      }
  134|       |
  135|       |      // Also, check that we actually can have this much leafs for this length
  136|  26.0k|      if (nCodes > maxCodes) {
  ------------------
  |  Branch (136:11): [True: 7, False: 26.0k]
  ------------------
  137|      7|        ThrowRDE(
  ------------------
  |  |   38|      7|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      7|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      7|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      7|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  138|      7|            "Corrupt Huffman. Can only fit %u out of %u codes in %lu-bit len",
  139|      7|            maxCodes, nCodes, codeLen);
  140|      7|      }
  141|       |
  142|       |      // There are nCodes leafs on this level, and those can not be branches
  143|  26.0k|      maxCodes -= nCodes;
  144|       |      // On the next level, rest can be branches, and can have two child Nodes
  145|  26.0k|      maxCodes *= 2;
  146|  26.0k|    }
  147|       |
  148|  2.42k|    return count;
  149|  2.44k|  }
_ZNK8rawspeed11HuffmanCodeINS_15BaselineCodeTagEE13maxCodesCountEv:
   61|  19.2k|  [[nodiscard]] unsigned int RAWSPEED_READONLY maxCodesCount() const {
   62|  19.2k|    return std::accumulate(nCodesPerLength.begin(), nCodesPerLength.end(), 0U);
   63|  19.2k|  }
_ZN8rawspeed11HuffmanCodeINS_15BaselineCodeTagEE13setCodeValuesENS_10Array1DRefIKhEE:
  151|  2.40k|  void setCodeValues(Array1DRef<const typename Traits::CodeValueTy> data) {
  152|  2.40k|    invariant(data.size() <= Traits::MaxNumCodeValues);
  ------------------
  |  |   27|  2.40k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (152:5): [True: 2.40k, False: 0]
  ------------------
  153|  2.40k|    invariant(static_cast<unsigned>(data.size()) == maxCodesCount());
  ------------------
  |  |   27|  2.40k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (153:5): [True: 2.40k, False: 0]
  ------------------
  154|       |
  155|  2.40k|    this->codeValues.clear();
  156|  2.40k|    this->codeValues.reserve(maxCodesCount());
  157|  2.40k|    std::copy(data.begin(), data.end(), std::back_inserter(this->codeValues));
  158|  2.40k|    assert(this->codeValues.size() == maxCodesCount());
  ------------------
  |  Branch (158:5): [True: 2.40k, False: 0]
  ------------------
  159|       |
  160|  10.6k|    for (const auto& cValue : this->codeValues) {
  ------------------
  |  Branch (160:29): [True: 10.6k, False: 2.40k]
  ------------------
  161|  10.6k|      if (cValue <= Traits::MaxCodeValue)
  ------------------
  |  Branch (161:11): [True: 10.6k, False: 0]
  ------------------
  162|  10.6k|        continue;
  163|      0|      ThrowRDE("Corrupt Huffman code: code value %u is larger than maximum %u",
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  164|  10.6k|               cValue, Traits::MaxCodeValue);
  165|  10.6k|    }
  166|  2.40k|  }
_ZNK8rawspeed11HuffmanCodeINS_15BaselineCodeTagEEeqERKS2_:
   94|    327|  bool operator==(const HuffmanCode& other) const {
   95|    327|    return nCodesPerLength == other.nCodesPerLength &&
  ------------------
  |  Branch (95:12): [True: 174, False: 153]
  ------------------
   96|    174|           this->codeValues == other.codeValues;
  ------------------
  |  Branch (96:12): [True: 9, False: 165]
  ------------------
   97|    327|  }
_ZN8rawspeed11HuffmanCodeINS_15BaselineCodeTagEEcvNS_10PrefixCodeIS1_EEEv:
  168|  2.39k|  explicit operator PrefixCode<CodeTag>() {
  169|  2.39k|    std::vector<CodeSymbol> symbols = generateCodeSymbols();
  170|  2.39k|    return {std::move(symbols), std::move(Parent::codeValues)};
  171|  2.39k|  }
_ZNK8rawspeed11HuffmanCodeINS_15BaselineCodeTagEE19generateCodeSymbolsEv:
   66|  2.39k|  [[nodiscard]] std::vector<CodeSymbol> generateCodeSymbols() const {
   67|  2.39k|    std::vector<CodeSymbol> symbols;
   68|       |
   69|  2.39k|    assert(!nCodesPerLength.empty());
  ------------------
  |  Branch (69:5): [True: 2.39k, False: 0]
  ------------------
   70|  2.39k|    assert(maxCodesCount() > 0);
  ------------------
  |  Branch (70:5): [True: 2.39k, False: 0]
  ------------------
   71|       |
   72|  2.39k|    assert(this->codeValues.size() == maxCodesCount());
  ------------------
  |  Branch (72:5): [True: 2.39k, False: 0]
  ------------------
   73|       |
   74|       |    // reserve all the memory. avoids lots of small allocs
   75|  2.39k|    symbols.reserve(maxCodesCount());
   76|       |
   77|       |    // Figure C.1: make table of Huffman code length for each symbol
   78|       |    // Figure C.2: generate the codes themselves
   79|  2.39k|    uint32_t code = 0;
   80|  28.1k|    for (unsigned int l = 1; l <= maxCodeLength(); ++l) {
  ------------------
  |  Branch (80:30): [True: 25.7k, False: 2.39k]
  ------------------
   81|  36.3k|      for (unsigned int i = 0; i < nCodesPerLength[l]; ++i) {
  ------------------
  |  Branch (81:32): [True: 10.6k, False: 25.7k]
  ------------------
   82|  10.6k|        symbols.emplace_back(code, l);
   83|  10.6k|        code++;
   84|  10.6k|      }
   85|       |
   86|  25.7k|      code <<= 1;
   87|  25.7k|    }
   88|       |
   89|  2.39k|    assert(symbols.size() == maxCodesCount());
  ------------------
  |  Branch (89:5): [True: 2.39k, False: 0]
  ------------------
   90|       |
   91|  2.39k|    return symbols;
   92|  2.39k|  }
_ZNK8rawspeed11HuffmanCodeINS_15BaselineCodeTagEE13maxCodeLengthEv:
   51|  28.1k|  [[nodiscard]] size_t RAWSPEED_READONLY maxCodeLength() const {
   52|  28.1k|    return nCodesPerLength.size() - 1;
   53|  28.1k|  }

_ZN8rawspeed10PrefixCodeINS_15BaselineCodeTagEEC2ENSt3__16vectorINS_18AbstractPrefixCodeIS1_E10CodeSymbolENS3_9allocatorIS7_EEEENS4_IhNS8_IhEEEE:
   52|  2.39k|      : Base(std::move(codeValues_)), symbols(std::move(symbols_)) {
   53|  2.39k|    if (symbols.empty() || Base::codeValues.empty() ||
  ------------------
  |  Branch (53:9): [True: 0, False: 2.39k]
  |  Branch (53:28): [True: 0, False: 2.39k]
  ------------------
   54|  2.39k|        symbols.size() != Base::codeValues.size())
  ------------------
  |  Branch (54:9): [True: 0, False: 2.39k]
  ------------------
   55|  2.39k|      ThrowRDE("Malformed code");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   56|       |
   57|  2.39k|    nCodesPerLength.resize(1 + Traits::MaxCodeLenghtBits);
   58|  10.6k|    for (const CodeSymbol& s : symbols) {
  ------------------
  |  Branch (58:30): [True: 10.6k, False: 2.39k]
  ------------------
   59|  10.6k|      assert(s.code_len > 0 && s.code_len <= Traits::MaxCodeLenghtBits);
  ------------------
  |  Branch (59:7): [True: 10.6k, False: 0]
  |  Branch (59:7): [True: 10.6k, False: 0]
  |  Branch (59:7): [True: 10.6k, False: 0]
  ------------------
   60|  10.6k|      ++nCodesPerLength[s.code_len];
   61|  10.6k|    }
   62|  15.0k|    while (nCodesPerLength.back() == 0)
  ------------------
  |  Branch (62:12): [True: 12.6k, False: 2.39k]
  ------------------
   63|  12.6k|      nCodesPerLength.pop_back();
   64|  2.39k|    assert(nCodesPerLength.size() > 1);
  ------------------
  |  Branch (64:5): [True: 2.39k, False: 0]
  ------------------
   65|       |
   66|  2.39k|    verifyCodeSymbols();
   67|  2.39k|  }
_ZN8rawspeed10PrefixCodeINS_15BaselineCodeTagEE17verifyCodeSymbolsEv:
   70|  2.39k|  void verifyCodeSymbols() {
   71|       |    // We are at the Root node, len is 1, there are two possible child Nodes
   72|  2.39k|    unsigned maxCodes = 2;
   73|  28.1k|    for (auto codeLen = 1UL; codeLen < nCodesPerLength.size(); codeLen++) {
  ------------------
  |  Branch (73:30): [True: 25.7k, False: 2.39k]
  ------------------
   74|       |      // we have codeLen bits. make sure that that code count can actually fit
   75|       |      // E.g. for len 1 we could have two codes: 0b0 and 0b1
   76|       |      // (but in that case there can be no other codes (with higher lengths))
   77|  25.7k|      const unsigned nCodes = nCodesPerLength[codeLen];
   78|  25.7k|      if (nCodes > maxCodes)
  ------------------
  |  Branch (78:11): [True: 0, False: 25.7k]
  ------------------
   79|  25.7k|        ThrowRDE("Too many codes of of length %lu.", codeLen);
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   80|       |      // There are nCodes leafs on this level, and those can not be branches
   81|  25.7k|      maxCodes -= nCodes;
   82|       |      // On the next level, rest can be branches, and can have two child Nodes
   83|  25.7k|      maxCodes *= 2;
   84|  25.7k|    }
   85|       |
   86|       |    // The code symbols are ordered so that the code lengths are not decreasing.
   87|       |    // NOTE: codes of same lenght are not nessesairly sorted!
   88|  2.39k|    if (std::adjacent_find(
  ------------------
  |  Branch (88:9): [True: 0, False: 2.39k]
  ------------------
   89|  2.39k|            symbols.cbegin(), symbols.cend(),
   90|  2.39k|            [](const CodeSymbol& lhs, const CodeSymbol& rhs) -> bool {
   91|  2.39k|              return !std::less_equal<>()(lhs.code_len, rhs.code_len);
   92|  2.39k|            }) != symbols.cend())
   93|  2.39k|      ThrowRDE("Code symbols are not globally ordered");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   94|       |
   95|       |    // No two symbols should have the same prefix (high bits)
   96|       |    // Only analyze the lower triangular matrix, excluding diagonal
   97|  13.0k|    for (auto sId = 0UL; sId < symbols.size(); sId++) {
  ------------------
  |  Branch (97:26): [True: 10.6k, False: 2.39k]
  ------------------
   98|  45.1k|      for (auto pId = 0UL; pId < sId; pId++)
  ------------------
  |  Branch (98:28): [True: 34.5k, False: 10.6k]
  ------------------
   99|  34.5k|        if (CodeSymbol::HaveCommonPrefix(symbols[sId], symbols[pId]))
  ------------------
  |  Branch (99:13): [True: 0, False: 34.5k]
  ------------------
  100|  10.6k|          ThrowRDE("Not prefix codes!");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  101|  10.6k|    }
  102|  2.39k|  }
_ZZN8rawspeed10PrefixCodeINS_15BaselineCodeTagEE17verifyCodeSymbolsEvENKUlRKNS_18AbstractPrefixCodeIS1_E10CodeSymbolES7_E_clES7_S7_:
   90|  8.24k|            [](const CodeSymbol& lhs, const CodeSymbol& rhs) -> bool {
   91|  8.24k|              return !std::less_equal<>()(lhs.code_len, rhs.code_len);
   92|  8.24k|            }) != symbols.cend())

_ZN8rawspeed20PrefixCodeLUTDecoderINS_15BaselineCodeTagENS_23PrefixCodeLookupDecoderIS1_EEE5setupEbb:
   95|  2.39k|  void setup(bool fullDecode_, bool fixDNGBug16_) {
   96|  2.39k|    Base::setup(fullDecode_, fixDNGBug16_);
   97|       |
   98|       |    // Generate lookup table for fast decoding lookup.
   99|       |    // See definition of decodeLookup above
  100|  2.39k|    decodeLookup.resize(1 << LookupDepth);
  101|  8.73k|    for (size_t i = 0; i < Base::code.symbols.size(); i++) {
  ------------------
  |  Branch (101:24): [True: 7.73k, False: 996]
  ------------------
  102|  7.73k|      uint8_t code_l = Base::code.symbols[i].code_len;
  103|  7.73k|      if (code_l > static_cast<int>(LookupDepth))
  ------------------
  |  Branch (103:11): [True: 1.40k, False: 6.33k]
  ------------------
  104|  1.40k|        break;
  105|       |
  106|  6.33k|      auto ll = implicit_cast<uint16_t>(Base::code.symbols[i].code
  107|  6.33k|                                        << (LookupDepth - code_l));
  108|  6.33k|      auto ul =
  109|  6.33k|          implicit_cast<uint16_t>(ll | ((1 << (LookupDepth - code_l)) - 1));
  110|  6.33k|      static_assert(Traits::MaxCodeValueLenghtBits <=
  111|  6.33k|                    bitwidth<LUTEntryTy>() - PayloadShift);
  112|  6.33k|      LUTUnsignedEntryTy diff_l = Base::code.codeValues[i];
  113|  2.22M|      for (uint16_t c = ll; c <= ul; c++) {
  ------------------
  |  Branch (113:29): [True: 2.21M, False: 6.33k]
  ------------------
  114|  2.21M|        if (!(c < decodeLookup.size()))
  ------------------
  |  Branch (114:13): [True: 0, False: 2.21M]
  ------------------
  115|  2.21M|          ThrowRDE("Corrupt Huffman");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  116|       |
  117|  2.21M|        if (!FlagMask || !Base::isFullDecode() || code_l > LookupDepth ||
  ------------------
  |  Branch (117:13): [Folded, False: 2.21M]
  |  Branch (117:26): [True: 0, False: 2.21M]
  |  Branch (117:51): [True: 0, False: 2.21M]
  ------------------
  118|  2.21M|            (code_l + diff_l > LookupDepth && diff_l != 16)) {
  ------------------
  |  Branch (118:14): [True: 853k, False: 1.36M]
  |  Branch (118:47): [True: 744k, False: 108k]
  ------------------
  119|       |          // lookup bit depth is too small to fit both the encoded length
  120|       |          // and the final difference value.
  121|       |          // -> store only the length and do a normal sign extension later
  122|   744k|          invariant(!Base::isFullDecode() || diff_l > 0);
  ------------------
  |  |   27|   744k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (122:11): [True: 0, False: 744k]
  |  Branch (122:11): [True: 744k, False: 0]
  |  Branch (122:11): [True: 744k, False: 0]
  ------------------
  123|   744k|          decodeLookup[c] = diff_l << PayloadShift | code_l;
  124|       |
  125|   744k|          if (!Base::isFullDecode())
  ------------------
  |  Branch (125:15): [True: 0, False: 744k]
  ------------------
  126|      0|            decodeLookup[c] |= FlagMask;
  127|  1.47M|        } else {
  128|       |          // Lookup bit depth is sufficient to encode the final value.
  129|  1.47M|          decodeLookup[c] = FlagMask | code_l;
  130|  1.47M|          if (diff_l != 16 || Base::handleDNGBug16())
  ------------------
  |  Branch (130:15): [True: 1.36M, False: 108k]
  |  Branch (130:31): [True: 19.5k, False: 89.0k]
  ------------------
  131|  1.38M|            decodeLookup[c] += diff_l;
  132|       |
  133|  1.47M|          if (diff_l) {
  ------------------
  |  Branch (133:15): [True: 521k, False: 948k]
  ------------------
  134|   521k|            LUTUnsignedEntryTy diff;
  135|   521k|            if (diff_l != 16) {
  ------------------
  |  Branch (135:17): [True: 413k, False: 108k]
  ------------------
  136|   413k|              diff = extractHighBits(c, code_l + diff_l,
  137|   413k|                                     /*effectiveBitwidth=*/LookupDepth);
  138|   413k|              diff &= ((1 << diff_l) - 1);
  139|   413k|            } else {
  140|   108k|              diff = LUTUnsignedEntryTy(-32768);
  141|   108k|            }
  142|   521k|            decodeLookup[c] |= static_cast<LUTEntryTy>(
  143|   521k|                static_cast<LUTUnsignedEntryTy>(Base::extend(diff, diff_l))
  144|   521k|                << PayloadShift);
  145|   521k|          }
  146|  1.47M|        }
  147|  2.21M|      }
  148|  6.33k|    }
  149|  2.39k|  }
_ZNK8rawspeed20PrefixCodeLUTDecoderINS_15BaselineCodeTagENS_23PrefixCodeLookupDecoderIS1_EEE16decodeDifferenceINS_15BitStreamerJPEGEEEiRT_:
  161|  37.3M|  __attribute__((always_inline)) int decodeDifference(BIT_STREAM& bs) const {
  162|  37.3M|    static_assert(
  163|  37.3M|        BitStreamerTraits<BIT_STREAM>::canUseWithPrefixCodeDecoder,
  164|  37.3M|        "This BitStreamer specialization is not marked as usable here");
  165|  37.3M|    invariant(Base::isFullDecode());
  ------------------
  |  |   27|  37.3M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (165:5): [True: 37.3M, False: 0]
  ------------------
  166|  37.3M|    return decode<BIT_STREAM, true>(bs);
  167|  37.3M|  }
_ZNK8rawspeed20PrefixCodeLUTDecoderINS_15BaselineCodeTagENS_23PrefixCodeLookupDecoderIS1_EEE6decodeINS_15BitStreamerJPEGELb1EEEiRT_:
  174|  37.3M|  __attribute__((always_inline)) int decode(BIT_STREAM& bs) const {
  175|  37.3M|    static_assert(
  176|  37.3M|        BitStreamerTraits<BIT_STREAM>::canUseWithPrefixCodeDecoder,
  177|  37.3M|        "This BitStreamer specialization is not marked as usable here");
  178|  37.3M|    invariant(FULL_DECODE == Base::isFullDecode());
  ------------------
  |  |   27|  37.3M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (178:5): [True: 37.3M, False: 0]
  ------------------
  179|  37.3M|    bs.fill(32);
  180|       |
  181|  37.3M|    typename Base::CodeSymbol partial;
  182|  37.3M|    partial.code_len = LookupDepth;
  183|  37.3M|    partial.code = implicit_cast<typename Traits::CodeTy>(
  184|  37.3M|        bs.peekBitsNoFill(partial.code_len));
  185|       |
  186|  37.3M|    assert(partial.code < decodeLookup.size());
  ------------------
  |  Branch (186:5): [True: 37.3M, False: 1.04k]
  ------------------
  187|  37.3M|    auto lutEntry = static_cast<unsigned>(decodeLookup[partial.code]);
  188|  37.3M|    int payload = static_cast<int>(lutEntry) >> PayloadShift;
  189|  37.3M|    int len = lutEntry & LenMask;
  190|       |
  191|       |    // How far did reading of those LookupDepth bits *actually* move us forward?
  192|  37.3M|    bs.skipBitsNoFill(len);
  193|       |
  194|       |    // If the flag bit is set, then we have already skipped all the len bits
  195|       |    // we needed to skip, and payload is the answer we were looking for.
  196|  37.3M|    if (lutEntry & FlagMask)
  ------------------
  |  Branch (196:9): [True: 34.1M, False: 3.17M]
  ------------------
  197|  34.1M|      return payload;
  198|       |
  199|  3.17M|    typename Traits::CodeValueTy codeValue;
  200|  3.17M|    if (lutEntry) {
  ------------------
  |  Branch (200:9): [True: 3.07M, False: 98.7k]
  ------------------
  201|       |      // If the flag is not set, but the entry is not empty,
  202|       |      // the payload is the code value for this symbol.
  203|  3.07M|      partial.code_len = implicit_cast<uint8_t>(len);
  204|  3.07M|      codeValue = implicit_cast<typename Traits::CodeValueTy>(payload);
  205|  3.07M|      invariant(!FULL_DECODE || codeValue /*aka diff_l*/ > 0);
  ------------------
  |  |   27|  3.07M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (205:7): [Folded, False: 3.07M]
  |  Branch (205:7): [True: 3.07M, False: 0]
  |  Branch (205:7): [True: 3.07M, False: 0]
  ------------------
  206|  3.07M|    } else {
  207|       |      // No match in the lookup table, because either the code is longer
  208|       |      // than LookupDepth or the input is corrupt. Need to read more bits...
  209|  98.7k|      invariant(len == 0);
  ------------------
  |  |   27|  98.7k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (209:7): [True: 98.7k, False: 0]
  ------------------
  210|  98.7k|      bs.skipBitsNoFill(partial.code_len);
  211|  98.7k|      std::tie(partial, codeValue) =
  212|  98.7k|          Base::finishReadingPartialSymbol(bs, partial);
  213|  98.7k|    }
  214|       |
  215|  3.17M|    return Base::template processSymbol<BIT_STREAM, FULL_DECODE>(bs, partial,
  216|  3.17M|                                                                 codeValue);
  217|  3.17M|  }

_ZN8rawspeed23PrefixCodeLookupDecoderINS_15BaselineCodeTagEEC2EONS_11HuffmanCodeIS1_EE:
   80|  2.39k|      : Base(std::move(hc).operator rawspeed::PrefixCode<CodeTag>()) {}
_ZN8rawspeed23PrefixCodeLookupDecoderINS_15BaselineCodeTagEE5setupEbb:
   97|  2.39k|  void setup(bool fullDecode_, bool fixDNGBug16_) {
   98|  2.39k|    AbstractPrefixCodeDecoder<CodeTag>::setup(fullDecode_, fixDNGBug16_);
   99|       |
  100|       |    // Figure F.15: generate decoding tables
  101|  2.39k|    codeOffsetOL.resize(Base::maxCodeLength() + 1UL, MaxCodeValue);
  102|  2.39k|    maxCodeOL.resize(Base::maxCodeLength() + 1UL, MaxCodeValue);
  103|  2.39k|    for (unsigned int numCodesSoFar = 0, codeLen = 1;
  104|  26.3k|         codeLen <= Base::maxCodeLength(); codeLen++) {
  ------------------
  |  Branch (104:10): [True: 23.9k, False: 2.39k]
  ------------------
  105|  23.9k|      if (!Base::code.nCodesPerLength[codeLen])
  ------------------
  |  Branch (105:11): [True: 18.3k, False: 5.63k]
  ------------------
  106|  18.3k|        continue;
  107|  5.63k|      codeOffsetOL[codeLen] = implicit_cast<typename Traits::CodeTy>(
  108|  5.63k|          Base::code.symbols[numCodesSoFar].code - numCodesSoFar);
  109|  5.63k|      assert(codeOffsetOL[codeLen] != MaxCodeValue);
  ------------------
  |  Branch (109:7): [True: 5.63k, False: 0]
  ------------------
  110|  5.63k|      numCodesSoFar += Base::code.nCodesPerLength[codeLen];
  111|  5.63k|      maxCodeOL[codeLen] = Base::code.symbols[numCodesSoFar - 1].code;
  112|  5.63k|    }
  113|  2.39k|  }
_ZNK8rawspeed23PrefixCodeLookupDecoderINS_15BaselineCodeTagEE26finishReadingPartialSymbolINS_15BitStreamerJPEGEEENSt3__14pairINS_18AbstractPrefixCodeIS1_E10CodeSymbolEiEERT_S9_:
  136|  98.7k|                             typename Base::CodeSymbol partial) const {
  137|  98.7k|    static_assert(
  138|  98.7k|        BitStreamerTraits<BIT_STREAM>::canUseWithPrefixCodeDecoder,
  139|  98.7k|        "This BitStreamer specialization is not marked as usable here");
  140|   219k|    while (partial.code_len < Base::maxCodeLength() &&
  ------------------
  |  Branch (140:12): [True: 207k, False: 11.8k]
  ------------------
  141|   207k|           (MaxCodeValue == maxCodeOL[partial.code_len] ||
  ------------------
  |  Branch (141:13): [True: 119k, False: 87.6k]
  ------------------
  142|   120k|            partial.code > maxCodeOL[partial.code_len])) {
  ------------------
  |  Branch (142:13): [True: 669, False: 86.9k]
  ------------------
  143|   120k|      uint32_t temp = bs.getBitsNoFill(1);
  144|   120k|      partial.code =
  145|   120k|          implicit_cast<typename Traits::CodeTy>((partial.code << 1) | temp);
  146|   120k|      partial.code_len++;
  147|   120k|    }
  148|       |
  149|       |    // NOTE: when we are called from PrefixCodeLUTDecoder, the partial.code_len
  150|       |    // *could* be larger than the largest code lenght for this huffman table,
  151|       |    // which is a symptom of a corrupt code.
  152|  98.7k|    if (partial.code_len > Base::maxCodeLength() ||
  ------------------
  |  Branch (152:9): [True: 16, False: 98.7k]
  ------------------
  153|  98.7k|        partial.code > maxCodeOL[partial.code_len])
  ------------------
  |  Branch (153:9): [True: 187, False: 98.5k]
  ------------------
  154|  98.7k|      ThrowRDE("bad Huffman code: %u (len: %u)", partial.code,
  ------------------
  |  |   38|    203|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    203|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    203|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    203|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  155|  98.5k|               partial.code_len);
  156|       |
  157|  98.7k|    assert(MaxCodeValue != codeOffsetOL[partial.code_len]);
  ------------------
  |  Branch (157:5): [True: 98.5k, False: 0]
  ------------------
  158|  98.5k|    assert(partial.code >= codeOffsetOL[partial.code_len]);
  ------------------
  |  Branch (158:5): [True: 98.5k, False: 0]
  ------------------
  159|  98.5k|    unsigned codeIndex = partial.code - codeOffsetOL[partial.code_len];
  160|  98.5k|    assert(codeIndex < Base::code.codeValues.size());
  ------------------
  |  Branch (160:5): [True: 98.5k, False: 0]
  ------------------
  161|       |
  162|  98.5k|    typename Traits::CodeValueTy codeValue = Base::code.codeValues[codeIndex];
  163|  98.5k|    return {partial, codeValue};
  164|  98.5k|  }

_ZN8rawspeed8writeLogENS_10DEBUG_PRIOEPKcz:
   31|  6.27k|void writeLog(DEBUG_PRIO priority, const char* format, ...) {
   32|       |  // When fuzzing, any output is really undesirable.
   33|  6.27k|}

_ZN8rawspeed21getMisalignmentOffsetImQsr3stdE13is_integral_vIT_EEEmS1_m:
  109|  2.87k|                                                           uint64_t multiple) {
  110|  2.87k|  if (multiple == 0)
  ------------------
  |  Branch (110:7): [True: 0, False: 2.87k]
  ------------------
  111|      0|    return 0;
  112|  2.87k|  return value % multiple;
  113|  2.87k|}
_ZN8rawspeed15roundToMultipleImEET_S1_mb:
  117|  2.87k|                                              bool roundDown) {
  118|  2.87k|  uint64_t offset = getMisalignmentOffset(value, multiple);
  119|  2.87k|  if (offset == 0)
  ------------------
  |  Branch (119:7): [True: 375, False: 2.49k]
  ------------------
  120|    375|    return value;
  121|       |  // Drop remainder.
  122|  2.49k|  T roundedDown = value - offset;
  123|  2.49k|  if (roundDown) // If we were rounding down, then that's it.
  ------------------
  |  Branch (123:7): [True: 0, False: 2.49k]
  ------------------
  124|      0|    return roundedDown;
  125|       |  // Else, just add one multiple.
  126|  2.49k|  return roundedDown + multiple;
  127|  2.49k|}
_ZN8rawspeed7roundUpEmm:
  135|  2.87k|                                             uint64_t multiple) {
  136|  2.87k|  return roundToMultiple(value, multiple, /*roundDown=*/false);
  137|  2.87k|}
_ZN8rawspeed19roundUpDivisionSafeEmm:
  146|  3.19k|                                                         uint64_t div) {
  147|  3.19k|  return (value != 0) ? (1 + ((value - 1) / div)) : 0;
  ------------------
  |  Branch (147:10): [True: 3.19k, False: 0]
  ------------------
  148|  3.19k|}
_ZN8rawspeed21getMisalignmentOffsetIPhQsr3stdE12is_pointer_vIT_EEEmS2_m:
   98|  5.74k|                                                           uint64_t multiple) {
   99|  5.74k|  if (multiple == 0)
  ------------------
  |  Branch (99:7): [True: 0, False: 5.74k]
  ------------------
  100|      0|    return 0;
  101|  5.74k|  static_assert(bitwidth<uintptr_t>() >= bitwidth<T>(),
  102|  5.74k|                "uintptr_t can not represent all pointer values?");
  103|  5.74k|  return reinterpret_cast<uintptr_t>(value) % multiple;
  104|  5.74k|}
_ZN8rawspeed9isAlignedIPhEEbT_m:
  151|  5.74k|constexpr RAWSPEED_READNONE bool isAligned(T value, size_t multiple) {
  152|  5.74k|  return (multiple == 0) || (getMisalignmentOffset(value, multiple) == 0);
  ------------------
  |  Branch (152:10): [True: 0, False: 5.74k]
  |  Branch (152:29): [True: 5.74k, False: 0]
  ------------------
  153|  5.74k|}
_ZN8rawspeed9isAlignedIiEEbT_m:
  151|  2.87k|constexpr RAWSPEED_READNONE bool isAligned(T value, size_t multiple) {
  152|  2.87k|  return (multiple == 0) || (getMisalignmentOffset(value, multiple) == 0);
  ------------------
  |  Branch (152:10): [True: 0, False: 2.87k]
  |  Branch (152:29): [True: 2.87k, False: 0]
  ------------------
  153|  2.87k|}
_ZN8rawspeed21getMisalignmentOffsetIiQsr3stdE13is_integral_vIT_EEEmS1_m:
  109|  2.87k|                                                           uint64_t multiple) {
  110|  2.87k|  if (multiple == 0)
  ------------------
  |  Branch (110:7): [True: 0, False: 2.87k]
  ------------------
  111|      0|    return 0;
  112|  2.87k|  return value % multiple;
  113|  2.87k|}
_ZN8rawspeed9isAlignedIPSt4byteEEbT_m:
  151|  4.55M|constexpr RAWSPEED_READNONE bool isAligned(T value, size_t multiple) {
  152|  4.55M|  return (multiple == 0) || (getMisalignmentOffset(value, multiple) == 0);
  ------------------
  |  Branch (152:10): [True: 0, False: 4.55M]
  |  Branch (152:29): [True: 4.55M, False: 0]
  ------------------
  153|  4.55M|}
_ZN8rawspeed21getMisalignmentOffsetIPSt4byteQsr3stdE12is_pointer_vIT_EEEmS3_m:
   98|  4.55M|                                                           uint64_t multiple) {
   99|  4.55M|  if (multiple == 0)
  ------------------
  |  Branch (99:7): [True: 0, False: 4.55M]
  ------------------
  100|      0|    return 0;
  101|  4.55M|  static_assert(bitwidth<uintptr_t>() >= bitwidth<T>(),
  102|  4.55M|                "uintptr_t can not represent all pointer values?");
  103|  4.55M|  return reinterpret_cast<uintptr_t>(value) % multiple;
  104|  4.55M|}

_ZN8rawspeed12RawImageData10createDataEv:
   68|  2.87k|void RawImageData::createData() {
   69|  2.87k|  static constexpr const auto alignment = 16;
   70|       |
   71|  2.87k|  if (dim.x > 65535 || dim.y > 65535)
  ------------------
  |  Branch (71:7): [True: 0, False: 2.87k]
  |  Branch (71:24): [True: 0, False: 2.87k]
  ------------------
   72|  2.87k|    ThrowRDE("Dimensions too large for allocation.");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   73|  2.87k|  if (dim.x <= 0 || dim.y <= 0)
  ------------------
  |  Branch (73:7): [True: 0, False: 2.87k]
  |  Branch (73:21): [True: 0, False: 2.87k]
  ------------------
   74|  2.87k|    ThrowRDE("Dimension of one sides is less than 1 - cannot allocate image.");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   75|  2.87k|  if (cpp <= 0 || bpp <= 0)
  ------------------
  |  Branch (75:7): [True: 0, False: 2.87k]
  |  Branch (75:19): [True: 0, False: 2.87k]
  ------------------
   76|  2.87k|    ThrowRDE("Unspecified component count - cannot allocate image.");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   77|  2.87k|  if (isAllocated())
  ------------------
  |  Branch (77:7): [True: 0, False: 2.87k]
  ------------------
   78|  2.87k|    ThrowRDE("Duplicate data allocation in createData.");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   79|       |
   80|       |  // want each line to start at 16-byte aligned address
   81|  2.87k|  pitch =
   82|  2.87k|      implicit_cast<int>(roundUp(static_cast<size_t>(dim.x) * bpp, alignment));
   83|  2.87k|  assert(isAligned(pitch, alignment));
  ------------------
  |  Branch (83:3): [True: 2.87k, False: 0]
  ------------------
   84|       |
   85|       |#if defined(DEBUG) || __has_feature(address_sanitizer) ||                      \
   86|       |    defined(__SANITIZE_ADDRESS__)
   87|       |  // want to ensure that we have some padding
   88|       |  pitch += alignment * alignment;
   89|       |  assert(isAligned(pitch, alignment));
   90|       |#endif
   91|       |
   92|  2.87k|  padding = pitch - dim.x * bpp;
   93|       |
   94|       |#if defined(DEBUG) || __has_feature(address_sanitizer) ||                      \
   95|       |    defined(__SANITIZE_ADDRESS__)
   96|       |  assert(padding > 0);
   97|       |#endif
   98|       |
   99|  2.87k|  data.resize(static_cast<size_t>(pitch) * dim.y);
  100|       |
  101|  2.87k|  uncropped_dim = dim;
  102|       |
  103|  2.87k|#ifndef NDEBUG
  104|  2.87k|  const Array2DRef<std::byte> img = getByteDataAsUncroppedArray2DRef();
  105|       |
  106|  4.56M|  for (int j = 0; j < dim.y; j++) {
  ------------------
  |  Branch (106:19): [True: 4.55M, False: 2.87k]
  ------------------
  107|       |    // each line is indeed 16-byte aligned
  108|  4.55M|    assert(isAligned(&img(j, 0), alignment));
  ------------------
  |  Branch (108:5): [True: 4.55M, False: 0]
  ------------------
  109|  4.55M|  }
  110|  2.87k|#endif
  111|       |
  112|  2.87k|  poisonPadding();
  113|  2.87k|}
_ZN8rawspeed12RawImageData13poisonPaddingEv:
  127|  2.87k|void RawImageData::poisonPadding() {
  128|       |  // if we are building without ASAN, then there is no need/way to poison.
  129|       |  // however, i think it is better to have such an empty function rather
  130|       |  // than making this whole function not exist in ASAN-less builds
  131|  2.87k|}
_ZN8rawspeed12RawImageData6setCppEj:
  153|  3.08k|void RawImageData::setCpp(uint32_t val) {
  154|  3.08k|  if (isAllocated())
  ------------------
  |  Branch (154:7): [True: 0, False: 3.08k]
  ------------------
  155|  3.08k|    ThrowRDE("Attempted to set Components per pixel after data allocation");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  156|  3.08k|  if (val > 4) {
  ------------------
  |  Branch (156:7): [True: 38, False: 3.04k]
  ------------------
  157|     38|    ThrowRDE(
  ------------------
  |  |   38|     38|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     38|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     38|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     38|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  158|     38|        "Only up to 4 components per pixel is support - attempted to set: %u",
  159|     38|        val);
  160|     38|  }
  161|       |
  162|  3.04k|  bpp /= cpp;
  163|  3.04k|  cpp = val;
  164|  3.04k|  bpp *= val;
  165|  3.04k|}

_ZNK8rawspeed8RawImageptEv:
  253|  62.8k|  RawImageData* RAWSPEED_READONLY operator->() const { return &*p_; }
_ZNK8rawspeed12RawImageData6getCppEv:
  118|  17.0k|  [[nodiscard]] uint32_t RAWSPEED_READONLY getCpp() const { return cpp; }
_ZNK8rawspeed12RawImageData6getBppEv:
  119|  4.48k|  [[nodiscard]] uint32_t RAWSPEED_READONLY getBpp() const { return bpp; }
_ZNK8rawspeed12RawImageData11getDataTypeEv:
  125|  4.50k|  [[nodiscard]] rawspeed::RawImageType getDataType() const { return dataType; }
_ZNK8rawspeed12RawImageData11isAllocatedEv:
  152|  5.95k|  [[nodiscard]] bool isAllocated() const { return !data.empty(); }
_ZN8rawspeed8RawImageC2ENSt3__110shared_ptrINS_12RawImageDataEEE:
  257|  3.08k|  explicit RawImage(std::shared_ptr<RawImageData> p) : p_(std::move(p)) {}
_ZN8rawspeed8RawImage6createENS_12RawImageTypeE:
  265|  3.08k|inline RawImage RawImage::create(RawImageType type) {
  266|  3.08k|  switch (type) {
  ------------------
  |  Branch (266:11): [True: 3.08k, False: 0]
  ------------------
  267|  3.06k|  case RawImageType::UINT16:
  ------------------
  |  Branch (267:3): [True: 3.06k, False: 22]
  ------------------
  268|  3.06k|    return RawImage(std::make_shared<RawImageDataU16>());
  269|     22|  case RawImageType::F32:
  ------------------
  |  Branch (269:3): [True: 22, False: 3.06k]
  ------------------
  270|     22|    return RawImage(std::make_shared<RawImageDataFloat>());
  271|  3.08k|  }
  272|      0|  writeLog(DEBUG_PRIO::ERROR, "RawImage::create: Unknown Image type!");
  273|      0|  __builtin_unreachable();
  274|  3.08k|}
_ZN8rawspeed12RawImageData31getU16DataAsUncroppedArray2DRefEv:
  290|  4.46k|RawImageData::getU16DataAsUncroppedArray2DRef() noexcept {
  291|  4.46k|  assert(dataType == RawImageType::UINT16 &&
  ------------------
  |  Branch (291:3): [True: 4.46k, False: 0]
  |  Branch (291:3): [True: 4.46k, Folded]
  |  Branch (291:3): [True: 4.46k, False: 0]
  ------------------
  292|  4.46k|         "Attempting to access floating-point buffer as uint16_t.");
  293|  4.46k|  assert(!data.empty() && "Data not yet allocated.");
  ------------------
  |  Branch (293:3): [True: 4.46k, False: 0]
  |  Branch (293:3): [True: 4.46k, Folded]
  |  Branch (293:3): [True: 4.46k, False: 0]
  ------------------
  294|  4.46k|#pragma GCC diagnostic push
  295|  4.46k|#pragma GCC diagnostic ignored "-Wpragmas"
  296|  4.46k|#pragma GCC diagnostic ignored "-Wunknown-warning-option"
  297|  4.46k|#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
  298|  4.46k|  return {reinterpret_cast<uint16_t*>(data.data()), cpp * uncropped_dim.x,
  299|  4.46k|          uncropped_dim.y, static_cast<int>(pitch / sizeof(uint16_t))};
  300|  4.46k|#pragma GCC diagnostic pop
  301|  4.46k|}
_ZN8rawspeed12RawImageData32getByteDataAsUncroppedArray2DRefEv:
  330|  2.87k|RawImageData::getByteDataAsUncroppedArray2DRef() noexcept {
  331|  2.87k|  switch (dataType) {
  ------------------
  |  Branch (331:11): [True: 2.87k, False: 0]
  ------------------
  332|  2.87k|  case RawImageType::UINT16:
  ------------------
  |  Branch (332:3): [True: 2.87k, False: 0]
  ------------------
  333|  2.87k|    return getU16DataAsUncroppedArray2DRef();
  334|      0|  case RawImageType::F32:
  ------------------
  |  Branch (334:3): [True: 0, False: 2.87k]
  ------------------
  335|      0|    return getF32DataAsUncroppedArray2DRef();
  336|  2.87k|  }
  337|      0|  __builtin_unreachable();
  338|  2.87k|}
_ZN8rawspeed12RawImageDataD2Ev:
  117|  3.08k|  virtual ~RawImageData() = default;
_ZN8rawspeed12RawImageDataC2Ev:
  191|  3.08k|  RawImageData() = default;

_ZN8rawspeed17RawImageDataFloatC2Ev:
   43|     22|RawImageDataFloat::RawImageDataFloat() {
   44|     22|  bpp = sizeof(float);
   45|     22|  dataType = RawImageType::F32;
   46|     22|}

_ZN8rawspeed15RawImageDataU16C2Ev:
   52|  3.06k|RawImageDataU16::RawImageDataU16() {
   53|  3.06k|  dataType = RawImageType::UINT16;
   54|  3.06k|  bpp = sizeof(uint16_t);
   55|  3.06k|}

_ZN8rawspeed14ThrowExceptionINS_11IOExceptionEEEvPKcz:
   36|  1.43k|    ThrowException(const char* fmt, ...) {
   37|  1.43k|  static constexpr size_t bufSize = 8192;
   38|  1.43k|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|  1.43k|  static thread_local std::array<char, bufSize> buf;
   40|       |#elif defined(HAVE_GCC_THREAD_LOCAL)
   41|       |  static __thread char buf[bufSize];
   42|       |#else
   43|       |#pragma message                                                                \
   44|       |    "Don't have thread-local-storage! Exception text may be garbled if used multithreaded"
   45|       |  static char buf[bufSize];
   46|       |#endif
   47|       |
   48|  1.43k|  va_list val;
   49|  1.43k|  va_start(val, fmt);
   50|  1.43k|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|  1.43k|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|  1.43k|  throw T(buf.data());
   54|  1.43k|}
_ZN8rawspeed17RawspeedExceptionC2EPKc:
   67|  3.13k|      : std::runtime_error(msg) {
   68|  3.13k|    log(msg);
   69|  3.13k|  }
_ZN8rawspeed17RawspeedException3logEPKc:
   58|  3.13k|  log(const char* msg) {
   59|  3.13k|    writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", msg);
   60|  3.13k|  }
_ZN8rawspeed14ThrowExceptionINS_19RawDecoderExceptionEEEvPKcz:
   36|  1.64k|    ThrowException(const char* fmt, ...) {
   37|  1.64k|  static constexpr size_t bufSize = 8192;
   38|  1.64k|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|  1.64k|  static thread_local std::array<char, bufSize> buf;
   40|       |#elif defined(HAVE_GCC_THREAD_LOCAL)
   41|       |  static __thread char buf[bufSize];
   42|       |#else
   43|       |#pragma message                                                                \
   44|       |    "Don't have thread-local-storage! Exception text may be garbled if used multithreaded"
   45|       |  static char buf[bufSize];
   46|       |#endif
   47|       |
   48|  1.64k|  va_list val;
   49|  1.64k|  va_start(val, fmt);
   50|  1.64k|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|  1.64k|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|  1.64k|  throw T(buf.data());
   54|  1.64k|}
_ZN8rawspeed14ThrowExceptionINS_17RawspeedExceptionEEEvPKcz:
   36|     52|    ThrowException(const char* fmt, ...) {
   37|     52|  static constexpr size_t bufSize = 8192;
   38|     52|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|     52|  static thread_local std::array<char, bufSize> buf;
   40|       |#elif defined(HAVE_GCC_THREAD_LOCAL)
   41|       |  static __thread char buf[bufSize];
   42|       |#else
   43|       |#pragma message                                                                \
   44|       |    "Don't have thread-local-storage! Exception text may be garbled if used multithreaded"
   45|       |  static char buf[bufSize];
   46|       |#endif
   47|       |
   48|     52|  va_list val;
   49|     52|  va_start(val, fmt);
   50|     52|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|     52|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|     52|  throw T(buf.data());
   54|     52|}

_ZN8rawspeed20AbstractLJpegDecoderC2ENS_10ByteStreamENS_8RawImageE:
   50|  2.99k|    : input(bs), mRaw(std::move(img)) {
   51|  2.99k|  input.setByteOrder(Endianness::big);
   52|       |
   53|  2.99k|  if (!mRaw->dim.hasPositiveArea())
  ------------------
  |  Branch (53:7): [True: 60, False: 2.93k]
  ------------------
   54|  2.99k|    ThrowRDE("Image has zero size");
  ------------------
  |  |   38|     60|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     60|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     60|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     60|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   55|       |
   56|  2.93k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   57|       |  // Yeah, sure, here it would be just dumb to leave this for production :)
   58|  2.93k|  if (mRaw->dim.x > 19440 || mRaw->dim.y > 8842) {
  ------------------
  |  Branch (58:7): [True: 17, False: 2.91k]
  |  Branch (58:30): [True: 23, False: 2.89k]
  ------------------
   59|     40|    ThrowRDE("Unexpected image dimensions found: (%i; %i)", mRaw->dim.x,
  ------------------
  |  |   38|     40|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     40|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     40|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     40|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   60|     40|             mRaw->dim.y);
   61|     40|  }
   62|  2.93k|#endif
   63|  2.93k|}
_ZN8rawspeed20AbstractLJpegDecoder9decodeSOIEv:
   65|  2.54k|void AbstractLJpegDecoder::decodeSOI() {
   66|  2.54k|  if (getNextMarker(false) != JpegMarker::SOI)
  ------------------
  |  Branch (66:7): [True: 16, False: 2.52k]
  ------------------
   67|  2.54k|    ThrowRDE("Image did not start with SOI. Probably not an LJPEG");
  ------------------
  |  |   38|     16|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     16|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     16|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     16|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   68|       |
   69|  2.52k|  struct {
   70|  2.52k|    bool DRI = false;
   71|  2.52k|    bool DHT = false;
   72|  2.52k|    bool SOF = false;
   73|  2.52k|    bool SOS = false;
   74|  2.52k|  } FoundMarkers;
   75|       |
   76|  8.24k|  for (JpegMarker m; (m = getNextMarker(true)) != JpegMarker::EOI;) {
  ------------------
  |  Branch (76:22): [True: 7.92k, False: 318]
  ------------------
   77|  7.92k|    ByteStream data(input.getStream(input.peekU16()));
   78|  7.92k|    data.skipBytes(2); // headerLength
   79|       |
   80|  7.92k|    switch (m) {
   81|  3.24k|    case JpegMarker::DHT:
  ------------------
  |  Branch (81:5): [True: 3.24k, False: 4.68k]
  ------------------
   82|  3.24k|      if (FoundMarkers.SOS)
  ------------------
  |  Branch (82:11): [True: 3, False: 3.24k]
  ------------------
   83|  3.24k|        ThrowRDE("Found second DHT marker after SOS");
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   84|       |      // there can be more than one DHT markers.
   85|       |      // FIXME: do we really want to reparse and use the last one?
   86|  3.24k|      parseDHT(data);
   87|  3.24k|      FoundMarkers.DHT = true;
   88|  3.24k|      break;
   89|  1.94k|    case JpegMarker::SOF3:
  ------------------
  |  Branch (89:5): [True: 1.94k, False: 5.98k]
  ------------------
   90|  1.94k|      if (FoundMarkers.SOS)
  ------------------
  |  Branch (90:11): [True: 8, False: 1.93k]
  ------------------
   91|  1.94k|        ThrowRDE("Found second SOF marker after SOS");
  ------------------
  |  |   38|      8|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      8|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      8|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      8|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   92|  1.93k|      if (FoundMarkers.SOF)
  ------------------
  |  Branch (92:11): [True: 1, False: 1.93k]
  ------------------
   93|  1.93k|        ThrowRDE("Found second SOF marker");
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   94|       |      // SOF is not required to be after DHT
   95|  1.93k|      parseSOF(data, &frame);
   96|  1.93k|      FoundMarkers.SOF = true;
   97|  1.93k|      break;
   98|  1.84k|    case JpegMarker::SOS:
  ------------------
  |  Branch (98:5): [True: 1.84k, False: 6.08k]
  ------------------
   99|  1.84k|      if (FoundMarkers.SOS)
  ------------------
  |  Branch (99:11): [True: 8, False: 1.83k]
  ------------------
  100|  1.84k|        ThrowRDE("Found second SOS marker");
  ------------------
  |  |   38|      8|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      8|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      8|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      8|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  101|  1.83k|      if (!FoundMarkers.DHT)
  ------------------
  |  Branch (101:11): [True: 1, False: 1.83k]
  ------------------
  102|  1.83k|        ThrowRDE("Did not find DHT marker before SOS.");
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  103|  1.83k|      if (!FoundMarkers.SOF)
  ------------------
  |  Branch (103:11): [True: 1, False: 1.83k]
  ------------------
  104|  1.83k|        ThrowRDE("Did not find SOF marker before SOS.");
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  105|  1.83k|      parseSOS(data);
  106|  1.83k|      FoundMarkers.SOS = true;
  107|  1.83k|      if (erratumImplicitEOIMarkerAfterScan())
  ------------------
  |  Branch (107:11): [True: 0, False: 1.83k]
  ------------------
  108|      0|        return;
  109|  1.83k|      break;
  110|  1.83k|    case JpegMarker::DQT:
  ------------------
  |  Branch (110:5): [True: 1, False: 7.92k]
  ------------------
  111|      1|      ThrowRDE("Not a valid RAW file.");
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  112|    161|    case JpegMarker::DRI:
  ------------------
  |  Branch (112:5): [True: 161, False: 7.76k]
  ------------------
  113|    161|      if (FoundMarkers.DRI)
  ------------------
  |  Branch (113:11): [True: 1, False: 160]
  ------------------
  114|    161|        ThrowRDE("Found second DRI marker");
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  115|    160|      parseDRI(data);
  116|    160|      FoundMarkers.DRI = true;
  117|    160|      break;
  118|    600|    default: // Just let it skip to next marker
  ------------------
  |  Branch (118:5): [True: 600, False: 7.32k]
  ------------------
  119|    600|      break;
  120|  7.92k|    }
  121|  7.92k|  }
  122|       |
  123|    318|  if (!FoundMarkers.SOS)
  ------------------
  |  Branch (123:7): [True: 6, False: 312]
  ------------------
  124|    318|    ThrowRDE("Did not find SOS marker.");
  ------------------
  |  |   38|      6|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      6|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      6|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      6|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  125|    318|}
_ZN8rawspeed20AbstractLJpegDecoder8parseSOFENS_10ByteStreamEPNS_7SOFInfoE:
  127|  1.93k|void AbstractLJpegDecoder::parseSOF(ByteStream sofInput, SOFInfo* sof) {
  128|  1.93k|  sof->prec = sofInput.getByte();
  129|  1.93k|  sof->h = sofInput.getU16();
  130|  1.93k|  sof->w = sofInput.getU16();
  131|  1.93k|  sof->cps = sofInput.getByte();
  132|       |
  133|  1.93k|  if (sof->prec < 2 || sof->prec > 16)
  ------------------
  |  Branch (133:7): [True: 5, False: 1.92k]
  |  Branch (133:24): [True: 4, False: 1.92k]
  ------------------
  134|  1.93k|    ThrowRDE("Invalid precision (%u).", sof->prec);
  ------------------
  |  |   38|      6|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      6|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      6|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      6|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  135|       |
  136|  1.92k|  if (sof->h == 0 || sof->w == 0)
  ------------------
  |  Branch (136:7): [True: 4, False: 1.92k]
  |  Branch (136:22): [True: 1, False: 1.92k]
  ------------------
  137|  1.92k|    ThrowRDE("Frame width or height set to zero");
  ------------------
  |  |   38|      2|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      2|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      2|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      2|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  138|       |
  139|  1.92k|  if (sof->cps > 4 || sof->cps < 1)
  ------------------
  |  Branch (139:7): [True: 10, False: 1.91k]
  |  Branch (139:23): [True: 1, False: 1.91k]
  ------------------
  140|  1.92k|    ThrowRDE("Only from 1 to 4 components are supported.");
  ------------------
  |  |   38|      8|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      8|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      8|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      8|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  141|       |
  142|  1.91k|  if (sof->cps < mRaw->getCpp()) {
  ------------------
  |  Branch (142:7): [True: 3, False: 1.91k]
  ------------------
  143|      3|    ThrowRDE("Component count should be no less than sample count (%u vs %u).",
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  144|      3|             sof->cps, mRaw->getCpp());
  145|      3|  }
  146|       |
  147|  1.91k|  if (sof->cps > static_cast<uint32_t>(mRaw->dim.x)) {
  ------------------
  |  Branch (147:7): [True: 1, False: 1.91k]
  ------------------
  148|      1|    ThrowRDE("Component count should be no greater than row length (%u vs %d).",
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  149|      1|             sof->cps, mRaw->dim.x);
  150|      1|  }
  151|       |
  152|  1.91k|  if (sofInput.getRemainSize() != 3 * sof->cps)
  ------------------
  |  Branch (152:7): [True: 48, False: 1.86k]
  ------------------
  153|  1.91k|    ThrowRDE("Header size mismatch.");
  ------------------
  |  |   38|     48|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     48|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     48|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     48|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  154|       |
  155|  9.20k|  for (uint32_t i = 0; i < sof->cps; i++) {
  ------------------
  |  Branch (155:24): [True: 7.35k, False: 1.84k]
  ------------------
  156|  7.35k|    sof->compInfo[i].componentId = sofInput.getByte();
  157|       |
  158|  7.35k|    uint32_t subs = sofInput.getByte();
  159|  7.35k|    frame.compInfo[i].superV = subs & 0xf;
  160|  7.35k|    frame.compInfo[i].superH = subs >> 4;
  161|       |
  162|  7.35k|    if (frame.compInfo[i].superV < 1 || frame.compInfo[i].superV > 4)
  ------------------
  |  Branch (162:9): [True: 1, False: 7.35k]
  |  Branch (162:41): [True: 2, False: 7.35k]
  ------------------
  163|  7.35k|      ThrowRDE("Horizontal sampling factor is invalid.");
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  164|       |
  165|  7.35k|    if (frame.compInfo[i].superH < 1 || frame.compInfo[i].superH > 4)
  ------------------
  |  Branch (165:9): [True: 1, False: 7.35k]
  |  Branch (165:41): [True: 3, False: 7.34k]
  ------------------
  166|  7.35k|      ThrowRDE("Horizontal sampling factor is invalid.");
  ------------------
  |  |   38|      4|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      4|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      4|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      4|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  167|       |
  168|  7.34k|    uint32_t Tq = sofInput.getByte();
  169|  7.34k|    if (Tq != 0)
  ------------------
  |  Branch (169:9): [True: 9, False: 7.33k]
  ------------------
  170|  7.34k|      ThrowRDE("Quantized components not supported.");
  ------------------
  |  |   38|      9|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      9|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      9|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      9|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  171|  7.34k|  }
  172|       |
  173|  1.84k|  if (static_cast<int>(sof->compInfo[0].superH) !=
  ------------------
  |  Branch (173:7): [True: 6, False: 1.84k]
  ------------------
  174|  1.84k|          mRaw->metadata.subsampling.x ||
  175|  1.84k|      static_cast<int>(sof->compInfo[0].superV) != mRaw->metadata.subsampling.y)
  ------------------
  |  Branch (175:7): [True: 3, False: 1.83k]
  ------------------
  176|  1.84k|    ThrowRDE("LJpeg's subsampling does not match image's subsampling.");
  ------------------
  |  |   38|      6|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      6|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      6|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      6|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  177|       |
  178|  1.84k|  sof->initialized = true;
  179|  1.84k|}
_ZN8rawspeed20AbstractLJpegDecoder8parseSOSENS_10ByteStreamE:
  181|  1.83k|void AbstractLJpegDecoder::parseSOS(ByteStream sos) {
  182|  1.83k|  invariant(frame.initialized);
  ------------------
  |  |   27|  1.83k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (182:3): [True: 1.83k, False: 0]
  ------------------
  183|       |
  184|  1.83k|  if (sos.getRemainSize() != 1 + 2 * frame.cps + 3)
  ------------------
  |  Branch (184:7): [True: 40, False: 1.79k]
  ------------------
  185|  1.83k|    ThrowRDE("Invalid SOS header length.");
  ------------------
  |  |   38|     40|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     40|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     40|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     40|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  186|       |
  187|  1.79k|  if (uint32_t soscps = sos.getByte(); frame.cps != soscps)
  ------------------
  |  Branch (187:40): [True: 7, False: 1.78k]
  ------------------
  188|  1.79k|    ThrowRDE("Component number mismatch.");
  ------------------
  |  |   38|      7|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      7|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      7|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      7|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  189|       |
  190|  8.82k|  for (uint32_t i = 0; i < frame.cps; i++) {
  ------------------
  |  Branch (190:24): [True: 7.07k, False: 1.75k]
  ------------------
  191|  7.07k|    uint32_t cs = sos.getByte();
  192|  7.07k|    uint32_t td = sos.getByte() >> 4;
  193|       |
  194|  7.07k|    if (td >= huff.size() || !huff[td])
  ------------------
  |  Branch (194:9): [True: 6, False: 7.06k]
  |  Branch (194:30): [True: 7, False: 7.05k]
  ------------------
  195|  7.07k|      ThrowRDE("Invalid Huffman table selection.");
  ------------------
  |  |   38|     13|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     13|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     13|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     13|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  196|       |
  197|  7.05k|    int ciIndex = -1;
  198|  35.2k|    for (uint32_t j = 0; j < frame.cps; ++j) {
  ------------------
  |  Branch (198:26): [True: 28.1k, False: 7.05k]
  ------------------
  199|  28.1k|      if (frame.compInfo[j].componentId == cs)
  ------------------
  |  Branch (199:11): [True: 7.08k, False: 21.0k]
  ------------------
  200|  7.08k|        ciIndex = j;
  201|  28.1k|    }
  202|       |
  203|  7.05k|    if (ciIndex == -1)
  ------------------
  |  Branch (203:9): [True: 19, False: 7.03k]
  ------------------
  204|  7.05k|      ThrowRDE("Invalid Component Selector");
  ------------------
  |  |   38|     19|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     19|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     19|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     19|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  205|       |
  206|  7.03k|    frame.compInfo[ciIndex].dcTblNo = td;
  207|  7.03k|  }
  208|       |
  209|       |  // Get predictor, see table H.1 from the JPEG spec
  210|  1.75k|  predictorMode = sos.getByte();
  211|       |  // The spec says predictoreMode is in [0..7], but Hasselblad uses '8'.
  212|  1.75k|  if (predictorMode > 8)
  ------------------
  |  Branch (212:7): [True: 7, False: 1.74k]
  ------------------
  213|  1.75k|    ThrowRDE("Invalid predictor mode.");
  ------------------
  |  |   38|      7|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      7|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      7|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      7|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  214|       |
  215|       |  // Se + Ah Not used in LJPEG
  216|  1.74k|  if (sos.getByte() != 0)
  ------------------
  |  Branch (216:7): [True: 10, False: 1.73k]
  ------------------
  217|  1.74k|    ThrowRDE("Se/Ah not zero.");
  ------------------
  |  |   38|     10|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     10|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     10|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     10|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  218|       |
  219|  1.73k|  Pt = sos.getByte(); // Point Transform
  220|  1.73k|  if (Pt > 15)
  ------------------
  |  Branch (220:7): [True: 4, False: 1.73k]
  ------------------
  221|  1.73k|    ThrowRDE("Invalid Point transform.");
  ------------------
  |  |   38|      4|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      4|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      4|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      4|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  222|  1.73k|  if (Pt != 0)
  ------------------
  |  Branch (222:7): [True: 7, False: 1.72k]
  ------------------
  223|  1.73k|    ThrowRDE("Point transform not supported.");
  ------------------
  |  |   38|      7|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      7|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      7|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      7|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  224|       |
  225|  1.72k|  const auto scanLength = decodeScan();
  226|       |  // FIXME: invariant(scanLength != 0);
  227|  1.72k|  input.skipBytes(scanLength);
  228|  1.72k|}
_ZN8rawspeed20AbstractLJpegDecoder8parseDHTENS_10ByteStreamE:
  230|  3.24k|void AbstractLJpegDecoder::parseDHT(ByteStream dht) {
  231|  5.64k|  while (dht.getRemainSize() > 0) {
  ------------------
  |  Branch (231:10): [True: 2.52k, False: 3.11k]
  ------------------
  232|  2.52k|    uint32_t b = dht.getByte();
  233|       |
  234|  2.52k|    if (uint32_t htClass = b >> 4; htClass != 0)
  ------------------
  |  Branch (234:36): [True: 20, False: 2.50k]
  ------------------
  235|  2.52k|      ThrowRDE("Unsupported Table class.");
  ------------------
  |  |   38|     20|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     20|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     20|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     20|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  236|       |
  237|  2.50k|    uint32_t htIndex = b & 0xf;
  238|  2.50k|    if (htIndex >= huff.size())
  ------------------
  |  Branch (238:9): [True: 12, False: 2.49k]
  ------------------
  239|  2.50k|      ThrowRDE("Invalid huffman table destination id.");
  ------------------
  |  |   38|     12|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     12|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     12|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     12|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  240|       |
  241|  2.49k|    if (huff[htIndex] != nullptr)
  ------------------
  |  Branch (241:9): [True: 25, False: 2.47k]
  ------------------
  242|  2.49k|      ThrowRDE("Duplicate table definition");
  ------------------
  |  |   38|     25|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     25|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     25|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     25|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  243|       |
  244|       |    // Temporary table, used during parsing LJpeg.
  245|  2.47k|    HuffmanCode<BaselineCodeTag> hc;
  246|       |
  247|       |    // copy 16 bytes from input stream to number of codes per length table
  248|  2.47k|    uint32_t nCodes = hc.setNCodesPerLength(dht.getBuffer(16));
  249|       |
  250|       |    // spec says 16 different codes is max but Hasselblad violates that -> 17
  251|  2.47k|    if (nCodes > 17)
  ------------------
  |  Branch (251:9): [True: 8, False: 2.46k]
  ------------------
  252|  2.47k|      ThrowRDE("Invalid DHT table.");
  ------------------
  |  |   38|      8|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      8|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      8|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      8|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  253|       |
  254|       |    // copy nCodes bytes from input stream to code values table
  255|  2.46k|    const auto codesBuf = dht.getBuffer(nCodes);
  256|  2.46k|    hc.setCodeValues(codesBuf.getAsArray1DRef());
  257|       |
  258|       |    // see if we already have a PrefixCodeDecoder with the same codes
  259|  2.46k|    assert(PrefixCodeDecoderStore.size() == huffmanCodeStore.size());
  ------------------
  |  Branch (259:5): [True: 2.40k, False: 57]
  ------------------
  260|  2.73k|    for (unsigned index = 0; index != PrefixCodeDecoderStore.size(); ++index) {
  ------------------
  |  Branch (260:30): [True: 327, False: 2.40k]
  ------------------
  261|    327|      if (*huffmanCodeStore[index] == hc)
  ------------------
  |  Branch (261:11): [True: 9, False: 318]
  ------------------
  262|      9|        huff[htIndex] = PrefixCodeDecoderStore[index].get();
  263|    327|    }
  264|       |
  265|  2.40k|    if (!huff[htIndex]) {
  ------------------
  |  Branch (265:9): [True: 2.39k, False: 9]
  ------------------
  266|  2.39k|      huffmanCodeStore.emplace_back(std::make_unique<decltype(hc)>(hc));
  267|       |      // setup new hc and put it into the store
  268|  2.39k|      auto dHT = std::make_unique<PrefixCodeDecoder<>>(std::move(hc));
  269|  2.39k|      dHT->setup(fullDecodeHT, fixDng16Bug);
  270|  2.39k|      huff[htIndex] = dHT.get();
  271|  2.39k|      PrefixCodeDecoderStore.emplace_back(std::move(dHT));
  272|  2.39k|    }
  273|  2.40k|  }
  274|  3.24k|}
_ZN8rawspeed20AbstractLJpegDecoder8parseDRIENS_10ByteStreamE:
  276|    160|void AbstractLJpegDecoder::parseDRI(ByteStream dri) {
  277|    160|  if (dri.getRemainSize() != 2)
  ------------------
  |  Branch (277:7): [True: 20, False: 140]
  ------------------
  278|    160|    ThrowRDE("Invalid DRI header length.");
  ------------------
  |  |   38|     20|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     20|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     20|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     20|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  279|    140|  numMCUsPerRestartInterval = dri.getU16();
  280|    140|}
_ZN8rawspeed20AbstractLJpegDecoder13getNextMarkerEb:
  282|  10.7k|JpegMarker AbstractLJpegDecoder::getNextMarker(bool allowskip) {
  283|  10.7k|  if (Optional<ByteStream> markerPos = advanceToNextMarker(input, allowskip))
  ------------------
  |  Branch (283:28): [True: 10.4k, False: 305]
  ------------------
  284|  10.4k|    input = *markerPos;
  285|    305|  else
  286|  10.7k|    ThrowRDE("(Noskip) Expected marker not found. Probably corrupt file.");
  ------------------
  |  |   38|    305|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    305|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    305|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    305|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  287|       |
  288|  10.4k|  JpegMarker m = *peekMarker(input);
  289|  10.4k|  input.skipBytes(2); // Skip the bytes we've just consumed.
  290|  10.4k|  return m;
  291|  10.7k|}

_ZN8rawspeed20AbstractLJpegDecoderD2Ev:
   92|  2.89k|  virtual ~AbstractLJpegDecoder() = default;
_ZNK8rawspeed20AbstractLJpegDecoder33erratumImplicitEOIMarkerAfterScanEv:
  101|    143|  [[nodiscard]] virtual bool erratumImplicitEOIMarkerAfterScan() const {
  102|    143|    return false;
  103|    143|  }
_ZNK8rawspeed20AbstractLJpegDecoder21getPrefixCodeDecodersEi:
  113|  1.72k|  getPrefixCodeDecoders(int N_COMP) const {
  114|  1.72k|    std::vector<const PrefixCodeDecoder<>*> ht(N_COMP);
  115|  8.59k|    for (int i = 0; i < N_COMP; ++i) {
  ------------------
  |  Branch (115:21): [True: 6.88k, False: 1.71k]
  ------------------
  116|  6.88k|      const unsigned dcTblNo = frame.compInfo[i].dcTblNo;
  117|  6.88k|      if (const auto dcTbls = implicit_cast<unsigned>(huff.size());
  118|  6.88k|          dcTblNo >= dcTbls) {
  ------------------
  |  Branch (118:11): [True: 4, False: 6.87k]
  ------------------
  119|      4|        ThrowRDE("Decoding table %u for comp %i does not exist (tables = %u)",
  ------------------
  |  |   38|      4|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      4|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      4|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      4|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  120|      4|                 dcTblNo, i, dcTbls);
  121|      4|      }
  122|  6.87k|      ht[i] = huff[dcTblNo];
  123|  6.87k|    }
  124|       |
  125|  1.71k|    return ht;
  126|  1.72k|  }
_ZNK8rawspeed20AbstractLJpegDecoder20getInitialPredictorsEi:
  128|  1.71k|  [[nodiscard]] std::vector<uint16_t> getInitialPredictors(int N_COMP) const {
  129|  1.71k|    std::vector<uint16_t> pred(N_COMP);
  130|  1.71k|    if (frame.prec < (Pt + 1)) {
  ------------------
  |  Branch (130:9): [True: 0, False: 1.71k]
  ------------------
  131|      0|      ThrowRDE("Invalid precision (%u) and point transform (%u) combination!",
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  132|      0|               frame.prec, Pt);
  133|      0|    }
  134|  1.71k|    std::fill(pred.begin(), pred.end(), 1 << (frame.prec - Pt - 1));
  135|  1.71k|    return pred;
  136|  1.71k|  }

_ZN8rawspeed10peekMarkerENS_10ByteStreamE:
  110|  11.1M|inline Optional<JpegMarker> peekMarker(ByteStream input) {
  111|  11.1M|  uint8_t c0 = input.peekByte(0);
  112|  11.1M|  uint8_t c1 = input.peekByte(1);
  113|       |
  114|  11.1M|  if (c0 == 0xFF && c1 != 0 && c1 != 0xFF)
  ------------------
  |  Branch (114:7): [True: 22.5k, False: 11.1M]
  |  Branch (114:21): [True: 22.2k, False: 323]
  |  Branch (114:32): [True: 20.9k, False: 1.28k]
  ------------------
  115|  20.9k|    return static_cast<JpegMarker>(c1);
  116|  11.1M|  return {};
  117|  11.1M|}
_ZN8rawspeed19advanceToNextMarkerENS_10ByteStreamEb:
  120|  10.7k|                                                bool skipPadding) {
  121|  11.1M|  while (input.getRemainSize() >= 2) {
  ------------------
  |  Branch (121:10): [True: 11.1M, False: 292]
  ------------------
  122|  11.1M|    if (Optional<JpegMarker> m = peekMarker(input))
  ------------------
  |  Branch (122:30): [True: 10.4k, False: 11.1M]
  ------------------
  123|  10.4k|      return input;
  124|       |
  125|       |    // Marker not found. Might there be leading padding bytes?
  126|  11.1M|    if (!skipPadding)
  ------------------
  |  Branch (126:9): [True: 13, False: 11.1M]
  ------------------
  127|     13|      break; // Nope, give up.
  128|       |
  129|       |    // Advance by a single(!) byte and try again.
  130|  11.1M|    input.skipBytes(1);
  131|  11.1M|  }
  132|       |
  133|    305|  return std::nullopt;
  134|  10.7k|}
_ZN8rawspeed22getRestartMarkerNumberENS_10JpegMarkerE:
  137|    130|inline Optional<int> getRestartMarkerNumber(JpegMarker m) {
  138|    130|  switch (m) {
  139|      0|    using enum JpegMarker;
  140|     57|  case RST0:
  ------------------
  |  Branch (140:3): [True: 57, False: 73]
  ------------------
  141|     89|  case RST1:
  ------------------
  |  Branch (141:3): [True: 32, False: 98]
  ------------------
  142|    106|  case RST2:
  ------------------
  |  Branch (142:3): [True: 17, False: 113]
  ------------------
  143|    113|  case RST3:
  ------------------
  |  Branch (143:3): [True: 7, False: 123]
  ------------------
  144|    113|  case RST4:
  ------------------
  |  Branch (144:3): [True: 0, False: 130]
  ------------------
  145|    114|  case RST5:
  ------------------
  |  Branch (145:3): [True: 1, False: 129]
  ------------------
  146|    115|  case RST6:
  ------------------
  |  Branch (146:3): [True: 1, False: 129]
  ------------------
  147|    115|  case RST7:
  ------------------
  |  Branch (147:3): [True: 0, False: 130]
  ------------------
  148|    115|    return static_cast<uint8_t>(m) - static_cast<uint8_t>(RST0);
  149|     15|  default:
  ------------------
  |  Branch (149:3): [True: 15, False: 115]
  ------------------
  150|     15|    return std::nullopt; // Not a restart marker.
  151|    130|  }
  152|    130|}

_ZN8rawspeed12LJpegDecoderC2ENS_10ByteStreamERKNS_8RawImageE:
   44|  2.99k|    : AbstractLJpegDecoder(bs, img) {
   45|  2.99k|  if (mRaw->getDataType() != RawImageType::UINT16)
  ------------------
  |  Branch (45:7): [True: 5, False: 2.98k]
  ------------------
   46|  2.99k|    ThrowRDE("Unexpected data type (%u)",
  ------------------
  |  |   38|      5|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      5|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      5|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      5|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   47|  2.98k|             static_cast<unsigned>(mRaw->getDataType()));
   48|       |
   49|  2.98k|  if ((mRaw->getCpp() != 1 || mRaw->getBpp() != sizeof(uint16_t)) &&
  ------------------
  |  Branch (49:8): [True: 593, False: 2.39k]
  |  Branch (49:31): [True: 0, False: 2.39k]
  ------------------
   50|    493|      (mRaw->getCpp() != 2 || mRaw->getBpp() != 2 * sizeof(uint16_t)) &&
  ------------------
  |  Branch (50:8): [True: 248, False: 245]
  |  Branch (50:31): [True: 0, False: 245]
  ------------------
   51|    248|      (mRaw->getCpp() != 3 || mRaw->getBpp() != 3 * sizeof(uint16_t)))
  ------------------
  |  Branch (51:8): [True: 5, False: 243]
  |  Branch (51:31): [True: 0, False: 243]
  ------------------
   52|  2.98k|    ThrowRDE("Unexpected component count (%u)", mRaw->getCpp());
  ------------------
  |  |   38|      5|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      5|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      5|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      5|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   53|       |
   54|  2.98k|  if (!mRaw->dim.hasPositiveArea())
  ------------------
  |  Branch (54:7): [True: 0, False: 2.98k]
  ------------------
   55|  2.98k|    ThrowRDE("Image has zero size");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   56|       |
   57|  2.98k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   58|       |  // Yeah, sure, here it would be just dumb to leave this for production :)
   59|  2.98k|  if (mRaw->dim.x > 9728 || mRaw->dim.y > 6656) {
  ------------------
  |  Branch (59:7): [True: 103, False: 2.87k]
  |  Branch (59:29): [True: 5, False: 2.87k]
  ------------------
   60|      8|    ThrowRDE("Unexpected image dimensions found: (%i; %i)", mRaw->dim.x,
  ------------------
  |  |   38|      8|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      8|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      8|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      8|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   61|      8|             mRaw->dim.y);
   62|      8|  }
   63|  2.98k|#endif
   64|  2.98k|}
_ZN8rawspeed12LJpegDecoder6decodeEjjjjNS_8iPoint2DEb:
   68|  2.87k|                          bool fixDng16Bug_) {
   69|  2.87k|  if (offsetX >= static_cast<unsigned>(mRaw->dim.x))
  ------------------
  |  Branch (69:7): [True: 60, False: 2.81k]
  ------------------
   70|  2.87k|    ThrowRDE("X offset outside of image");
  ------------------
  |  |   38|     60|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     60|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     60|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     60|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   71|  2.81k|  if (offsetY >= static_cast<unsigned>(mRaw->dim.y))
  ------------------
  |  Branch (71:7): [True: 53, False: 2.76k]
  ------------------
   72|  2.81k|    ThrowRDE("Y offset outside of image");
  ------------------
  |  |   38|     53|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     53|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     53|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     53|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   73|       |
   74|  2.76k|  if (width > static_cast<unsigned>(mRaw->dim.x))
  ------------------
  |  Branch (74:7): [True: 44, False: 2.71k]
  ------------------
   75|  2.76k|    ThrowRDE("Tile wider than image");
  ------------------
  |  |   38|     44|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     44|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     44|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     44|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   76|  2.71k|  if (height > static_cast<unsigned>(mRaw->dim.y))
  ------------------
  |  Branch (76:7): [True: 48, False: 2.66k]
  ------------------
   77|  2.71k|    ThrowRDE("Tile taller than image");
  ------------------
  |  |   38|     48|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     48|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     48|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     48|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   78|       |
   79|  2.66k|  if (offsetX + width > static_cast<unsigned>(mRaw->dim.x))
  ------------------
  |  Branch (79:7): [True: 14, False: 2.65k]
  ------------------
   80|  2.66k|    ThrowRDE("Tile overflows image horizontally");
  ------------------
  |  |   38|     14|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     14|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     14|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     14|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   81|  2.65k|  if (offsetY + height > static_cast<unsigned>(mRaw->dim.y))
  ------------------
  |  Branch (81:7): [True: 13, False: 2.64k]
  ------------------
   82|  2.65k|    ThrowRDE("Tile overflows image vertically");
  ------------------
  |  |   38|     13|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     13|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     13|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     13|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   83|       |
   84|  2.64k|  if (width == 0 || height == 0)
  ------------------
  |  Branch (84:7): [True: 4, False: 2.63k]
  |  Branch (84:21): [True: 1, False: 2.63k]
  ------------------
   85|      5|    return; // We do not need anything from this tile.
   86|       |
   87|  2.63k|  if (!maxDim_.hasPositiveArea() ||
  ------------------
  |  Branch (87:7): [True: 68, False: 2.56k]
  ------------------
   88|  2.56k|      implicit_cast<unsigned>(maxDim_.x) < width ||
  ------------------
  |  Branch (88:7): [True: 13, False: 2.55k]
  ------------------
   89|  2.55k|      implicit_cast<unsigned>(maxDim_.y) < height)
  ------------------
  |  Branch (89:7): [True: 13, False: 2.54k]
  ------------------
   90|  2.63k|    ThrowRDE("Requested tile is larger than tile's maximal dimensions");
  ------------------
  |  |   38|     94|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     94|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     94|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     94|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   91|       |
   92|  2.54k|  offX = offsetX;
   93|  2.54k|  offY = offsetY;
   94|  2.54k|  w = width;
   95|  2.54k|  h = height;
   96|       |
   97|  2.54k|  maxDim = maxDim_;
   98|       |
   99|  2.54k|  fixDng16Bug = fixDng16Bug_;
  100|       |
  101|  2.54k|  AbstractLJpegDecoder::decodeSOI();
  102|  2.54k|}
_ZN8rawspeed12LJpegDecoder10decodeScanEv:
  104|  1.72k|Buffer::size_type LJpegDecoder::decodeScan() {
  105|  1.72k|  invariant(frame.cps > 0);
  ------------------
  |  |   27|  1.72k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (105:3): [True: 1.72k, False: 0]
  ------------------
  106|       |
  107|  1.72k|  if (predictorMode != 1)
  ------------------
  |  Branch (107:7): [True: 3, False: 1.72k]
  ------------------
  108|  1.72k|    ThrowRDE("Unsupported predictor mode: %u", predictorMode);
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  109|       |
  110|  8.61k|  for (uint32_t i = 0; i < frame.cps; i++)
  ------------------
  |  Branch (110:24): [True: 6.89k, False: 1.72k]
  ------------------
  111|  6.89k|    if (frame.compInfo[i].superH != 1 || frame.compInfo[i].superV != 1)
  ------------------
  |  Branch (111:9): [True: 1, False: 6.89k]
  |  Branch (111:42): [True: 1, False: 6.89k]
  ------------------
  112|  1.72k|      ThrowRDE("Unsupported subsampling");
  ------------------
  |  |   38|      2|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  1.72k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  1.72k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  1.72k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  113|       |
  114|  1.72k|  int N_COMP = frame.cps;
  115|       |
  116|  1.72k|  std::vector<LJpegDecompressor::PerComponentRecipe> rec;
  117|  1.72k|  rec.reserve(N_COMP);
  118|  1.72k|  std::generate_n(std::back_inserter(rec), N_COMP,
  119|  1.72k|                  [&rec, hts = getPrefixCodeDecoders(N_COMP),
  120|  1.72k|                   initPred = getInitialPredictors(
  121|  1.72k|                       N_COMP)]() -> LJpegDecompressor::PerComponentRecipe {
  122|  1.72k|                    const auto i = implicit_cast<int>(rec.size());
  123|  1.72k|                    return {*hts[i], initPred[i]};
  124|  1.72k|                  });
  125|       |
  126|  1.72k|  const iRectangle2D imgFrame = {
  127|  1.72k|      {static_cast<int>(offX), static_cast<int>(offY)},
  128|  1.72k|      {static_cast<int>(w), static_cast<int>(h)}};
  129|  1.72k|  const auto jpegFrameDim = iPoint2D(frame.w, frame.h);
  130|       |
  131|  1.72k|  if (implicit_cast<int64_t>(maxDim.x) * implicit_cast<int>(mRaw->getCpp()) >
  ------------------
  |  Branch (131:7): [True: 6, False: 1.71k]
  ------------------
  132|  1.72k|      std::numeric_limits<int>::max())
  133|  1.72k|    ThrowRDE("Maximal output tile is too large");
  ------------------
  |  |   38|      6|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      6|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      6|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      6|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  134|       |
  135|  1.71k|  auto maxRes =
  136|  1.71k|      iPoint2D(implicit_cast<int>(mRaw->getCpp()) * maxDim.x, maxDim.y);
  137|  1.71k|  if (maxRes.area() != N_COMP * jpegFrameDim.area())
  ------------------
  |  Branch (137:7): [True: 100, False: 1.61k]
  ------------------
  138|  1.71k|    ThrowRDE("LJpeg frame area does not match maximal tile area");
  ------------------
  |  |   38|    100|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    100|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    100|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    100|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  139|       |
  140|  1.61k|  if (maxRes.x % jpegFrameDim.x != 0 || maxRes.y % jpegFrameDim.y != 0)
  ------------------
  |  Branch (140:7): [True: 6, False: 1.61k]
  |  Branch (140:41): [True: 1, False: 1.60k]
  ------------------
  141|  1.61k|    ThrowRDE("Maximal output tile size is not a multiple of LJpeg frame size");
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  142|       |
  143|  1.61k|  auto MCUSize = iPoint2D{maxRes.x / jpegFrameDim.x, maxRes.y / jpegFrameDim.y};
  144|  1.61k|  if (MCUSize.area() != implicit_cast<uint64_t>(N_COMP))
  ------------------
  |  Branch (144:7): [True: 0, False: 1.61k]
  ------------------
  145|  1.61k|    ThrowRDE("Unexpected MCU size, does not match LJpeg component count");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  146|       |
  147|  1.61k|  const LJpegDecompressor::Frame jpegFrame = {MCUSize, jpegFrameDim};
  148|       |
  149|  1.61k|  int numLJpegRowsPerRestartInterval;
  150|  1.61k|  if (numMCUsPerRestartInterval == 0) {
  ------------------
  |  Branch (150:7): [True: 1.48k, False: 126]
  ------------------
  151|       |    // Restart interval not enabled, so all of the rows
  152|       |    // are contained in the first (implicit) restart interval.
  153|  1.48k|    numLJpegRowsPerRestartInterval = jpegFrameDim.y;
  154|  1.48k|  } else {
  155|    126|    const int numMCUsPerRow = jpegFrameDim.x;
  156|    126|    if (numMCUsPerRestartInterval % numMCUsPerRow != 0)
  ------------------
  |  Branch (156:9): [True: 5, False: 121]
  ------------------
  157|    126|      ThrowRDE("Restart interval is not a multiple of frame row size");
  ------------------
  |  |   38|      5|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      5|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      5|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      5|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  158|    121|    numLJpegRowsPerRestartInterval = numMCUsPerRestartInterval / numMCUsPerRow;
  159|    121|  }
  160|       |
  161|  1.60k|  LJpegDecompressor d(mRaw, imgFrame, jpegFrame, rec,
  162|  1.60k|                      numLJpegRowsPerRestartInterval,
  163|  1.60k|                      input.peekRemainingBuffer().getAsArray1DRef());
  164|  1.60k|  return d.decode();
  165|  1.61k|}
LJpegDecoder.cpp:_ZZN8rawspeed12LJpegDecoder10decodeScanEvENK3$_0clEv:
  121|  6.87k|                       N_COMP)]() -> LJpegDecompressor::PerComponentRecipe {
  122|  6.87k|                    const auto i = implicit_cast<int>(rec.size());
  123|  6.87k|                    return {*hts[i], initPred[i]};
  124|  6.87k|                  });

_ZN8rawspeed17LJpegDecompressorC2ENS_8RawImageENS_12iRectangle2DENS0_5FrameENSt3__16vectorINS0_18PerComponentRecipeENS4_9allocatorIS6_EEEEiNS_10Array1DRefIKhEE:
   57|  1.60k|    : mRaw(std::move(img)), input(input_), imgFrame(imgFrame_),
   58|  1.60k|      frame(std::move(frame_)), rec(std::move(rec_)),
   59|  1.60k|      numLJpegRowsPerRestartInterval(numLJpegRowsPerRestartInterval_) {
   60|       |
   61|  1.60k|  if (mRaw->getDataType() != RawImageType::UINT16)
  ------------------
  |  Branch (61:7): [True: 0, False: 1.60k]
  ------------------
   62|  1.60k|    ThrowRDE("Unexpected data type (%u)",
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   63|  1.60k|             static_cast<unsigned>(mRaw->getDataType()));
   64|       |
   65|  1.60k|  if ((mRaw->getCpp() != 1 || mRaw->getBpp() != sizeof(uint16_t)) &&
  ------------------
  |  Branch (65:8): [True: 63, False: 1.54k]
  |  Branch (65:31): [True: 0, False: 1.54k]
  ------------------
   66|     63|      (mRaw->getCpp() != 2 || mRaw->getBpp() != 2 * sizeof(uint16_t)) &&
  ------------------
  |  Branch (66:8): [True: 45, False: 18]
  |  Branch (66:31): [True: 0, False: 18]
  ------------------
   67|     45|      (mRaw->getCpp() != 3 || mRaw->getBpp() != 3 * sizeof(uint16_t)))
  ------------------
  |  Branch (67:8): [True: 0, False: 45]
  |  Branch (67:31): [True: 0, False: 45]
  ------------------
   68|  1.60k|    ThrowRDE("Unexpected component count (%u)", mRaw->getCpp());
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   69|       |
   70|  1.60k|  if (!mRaw->dim.hasPositiveArea())
  ------------------
  |  Branch (70:7): [True: 0, False: 1.60k]
  ------------------
   71|  1.60k|    ThrowRDE("Image has zero size");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   72|       |
   73|  1.60k|  if (!imgFrame.hasPositiveArea())
  ------------------
  |  Branch (73:7): [True: 0, False: 1.60k]
  ------------------
   74|  1.60k|    ThrowRDE("Tile has zero size");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   75|       |
   76|  1.60k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   77|       |  // Yeah, sure, here it would be just dumb to leave this for production :)
   78|  1.60k|  if (mRaw->dim.x > 9728 || mRaw->dim.y > 6656) {
  ------------------
  |  Branch (78:7): [True: 0, False: 1.60k]
  |  Branch (78:29): [True: 0, False: 1.60k]
  ------------------
   79|      0|    ThrowRDE("Unexpected image dimensions found: (%i; %i)", mRaw->dim.x,
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   80|      0|             mRaw->dim.y);
   81|      0|  }
   82|  1.60k|#endif
   83|       |
   84|  1.60k|  if (imgFrame.pos.x >= mRaw->dim.x)
  ------------------
  |  Branch (84:7): [True: 0, False: 1.60k]
  ------------------
   85|  1.60k|    ThrowRDE("X offset outside of image");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   86|  1.60k|  if (imgFrame.pos.y >= mRaw->dim.y)
  ------------------
  |  Branch (86:7): [True: 0, False: 1.60k]
  ------------------
   87|  1.60k|    ThrowRDE("Y offset outside of image");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   88|       |
   89|  1.60k|  if (imgFrame.dim.x > mRaw->dim.x)
  ------------------
  |  Branch (89:7): [True: 0, False: 1.60k]
  ------------------
   90|  1.60k|    ThrowRDE("Tile wider than image");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   91|  1.60k|  if (imgFrame.dim.y > mRaw->dim.y)
  ------------------
  |  Branch (91:7): [True: 0, False: 1.60k]
  ------------------
   92|  1.60k|    ThrowRDE("Tile taller than image");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   93|       |
   94|  1.60k|  if (imgFrame.pos.x + imgFrame.dim.x > mRaw->dim.x)
  ------------------
  |  Branch (94:7): [True: 0, False: 1.60k]
  ------------------
   95|  1.60k|    ThrowRDE("Tile overflows image horizontally");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   96|  1.60k|  if (imgFrame.pos.y + imgFrame.dim.y > mRaw->dim.y)
  ------------------
  |  Branch (96:7): [True: 0, False: 1.60k]
  ------------------
   97|  1.60k|    ThrowRDE("Tile overflows image vertically");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   98|       |
   99|  1.60k|  if (!frame.dim.hasPositiveArea())
  ------------------
  |  Branch (99:7): [True: 0, False: 1.60k]
  ------------------
  100|  1.60k|    ThrowRDE("Frame has zero size");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  101|       |
  102|  1.60k|  if (iPoint2D{1, 1} != frame.mcu && iPoint2D{2, 1} != frame.mcu &&
  ------------------
  |  Branch (102:7): [True: 1.60k, False: 0]
  |  Branch (102:7): [True: 1, False: 1.60k]
  |  Branch (102:38): [True: 1.60k, False: 0]
  ------------------
  103|  1.60k|      iPoint2D{3, 1} != frame.mcu && iPoint2D{4, 1} != frame.mcu &&
  ------------------
  |  Branch (103:7): [True: 1.60k, False: 0]
  |  Branch (103:38): [True: 819, False: 785]
  ------------------
  104|    819|      iPoint2D{2, 2} != frame.mcu)
  ------------------
  |  Branch (104:7): [True: 1, False: 818]
  ------------------
  105|  1.60k|    ThrowRDE("Unexpected MCU size: {%i, %i}", frame.mcu.x, frame.mcu.y);
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  106|       |
  107|  1.60k|  if (rec.size() != static_cast<unsigned>(frame.mcu.area()))
  ------------------
  |  Branch (107:7): [True: 0, False: 1.60k]
  ------------------
  108|  1.60k|    ThrowRDE("Must have exactly one recepie per component");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  109|       |
  110|  6.41k|  for (const auto& recip : rec) {
  ------------------
  |  Branch (110:26): [True: 6.41k, False: 1.60k]
  ------------------
  111|  6.41k|    if (!recip.ht.isFullDecode())
  ------------------
  |  Branch (111:9): [True: 0, False: 6.41k]
  ------------------
  112|  6.41k|      ThrowRDE("Huffman table is not of a full decoding variety");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  113|  6.41k|  }
  114|       |
  115|  1.60k|  if (numLJpegRowsPerRestartInterval < 1)
  ------------------
  |  Branch (115:7): [True: 0, False: 1.60k]
  ------------------
  116|  1.60k|    ThrowRDE("Number of rows per restart interval must be positives");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  117|       |
  118|  1.60k|  if (static_cast<int64_t>(frame.mcu.x) * frame.dim.x >
  ------------------
  |  Branch (118:7): [True: 0, False: 1.60k]
  ------------------
  119|  1.60k|          std::numeric_limits<int>::max() ||
  120|  1.60k|      static_cast<int64_t>(frame.mcu.y) * frame.dim.y >
  ------------------
  |  Branch (120:7): [True: 0, False: 1.60k]
  ------------------
  121|  1.60k|          std::numeric_limits<int>::max())
  122|  1.60k|    ThrowRDE("LJpeg frame is too big");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  123|       |
  124|  1.60k|  if (static_cast<int64_t>(mRaw->getCpp()) * imgFrame.dim.x >
  ------------------
  |  Branch (124:7): [True: 0, False: 1.60k]
  ------------------
  125|  1.60k|      std::numeric_limits<int>::max())
  126|  1.60k|    ThrowRDE("Img frame is too big");
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  127|       |
  128|  1.60k|  if (imgFrame.dim.x < frame.mcu.x || imgFrame.dim.y < frame.mcu.y)
  ------------------
  |  Branch (128:7): [True: 1, False: 1.60k]
  |  Branch (128:39): [True: 2, False: 1.60k]
  ------------------
  129|  1.60k|    ThrowRDE("Tile size is smaller than a single frame MCU");
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  130|       |
  131|  1.60k|  if (imgFrame.dim.y % frame.mcu.y != 0)
  ------------------
  |  Branch (131:7): [True: 5, False: 1.59k]
  ------------------
  132|  1.60k|    ThrowRDE("Output row count is not a multiple of MCU row count");
  ------------------
  |  |   38|      5|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      5|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      5|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      5|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  133|       |
  134|  1.59k|  const int tileRequiredWidth =
  135|  1.59k|      static_cast<int>(mRaw->getCpp()) * imgFrame.dim.x;
  136|       |
  137|       |  // How many full pixel MCUs do we need to consume for that?
  138|  1.59k|  if (const auto mcusToConsume = implicit_cast<int>(
  139|  1.59k|          roundUpDivisionSafe(tileRequiredWidth, frame.mcu.x));
  140|  1.59k|      frame.dim.x < mcusToConsume ||
  ------------------
  |  Branch (140:7): [True: 0, False: 1.59k]
  ------------------
  141|  1.59k|      frame.mcu.y * frame.dim.y < imgFrame.dim.y ||
  ------------------
  |  Branch (141:7): [True: 0, False: 1.59k]
  ------------------
  142|  1.59k|      frame.mcu.x * frame.dim.x < tileRequiredWidth) {
  ------------------
  |  Branch (142:7): [True: 0, False: 1.59k]
  ------------------
  143|      0|    ThrowRDE("LJpeg frame (%d, %d) is smaller than expected (%d, %d)",
  ------------------
  |  |   38|      0|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  144|      0|             frame.mcu.x * frame.dim.x, frame.mcu.y * frame.dim.y,
  145|      0|             tileRequiredWidth, imgFrame.dim.y);
  146|      0|  }
  147|       |
  148|       |  // How many full pixel MCUs will we produce?
  149|  1.59k|  numFullMCUs = tileRequiredWidth / frame.mcu.x; // Truncating division!
  150|       |  // Do we need to also produce part of a MCU?
  151|  1.59k|  trailingPixels = tileRequiredWidth % frame.mcu.x;
  152|  1.59k|}
_ZNK8rawspeed17LJpegDecompressor6decodeEv:
  341|  1.59k|ByteStream::size_type LJpegDecompressor::decode() const {
  342|  1.59k|  switch (frame.mcu.area()) {
  343|      0|  case 1:
  ------------------
  |  Branch (343:3): [True: 0, False: 1.59k]
  ------------------
  344|      0|    if (frame.mcu == MCU<1, 1>) {
  ------------------
  |  Branch (344:9): [True: 0, False: 0]
  ------------------
  345|      0|      return decodeN<MCU<1, 1>>();
  346|      0|    }
  347|      0|    break;
  348|      0|  case 2:
  ------------------
  |  Branch (348:3): [True: 0, False: 1.59k]
  ------------------
  349|      0|    if (frame.mcu == MCU<2, 1>) {
  ------------------
  |  Branch (349:9): [True: 0, False: 0]
  ------------------
  350|      0|      return decodeN<MCU<2, 1>>();
  351|      0|    }
  352|      0|    break;
  353|      0|  case 3:
  ------------------
  |  Branch (353:3): [True: 0, False: 1.59k]
  ------------------
  354|      0|    if (frame.mcu == MCU<3, 1>) {
  ------------------
  |  Branch (354:9): [True: 0, False: 0]
  ------------------
  355|      0|      return decodeN<MCU<3, 1>>();
  356|      0|    }
  357|      0|    break;
  358|  1.59k|  case 4:
  ------------------
  |  Branch (358:3): [True: 1.59k, False: 0]
  ------------------
  359|  1.59k|    if (frame.mcu == MCU<4, 1>) {
  ------------------
  |  Branch (359:9): [True: 785, False: 810]
  ------------------
  360|    785|      return decodeN<MCU<4, 1>>();
  361|    785|    }
  362|    810|    if (frame.mcu == MCU<2, 2>) {
  ------------------
  |  Branch (362:9): [True: 810, False: 0]
  ------------------
  363|    810|      return decodeN<MCU<2, 2>>();
  364|    810|    }
  365|      0|    break;
  366|      0|  default:
  ------------------
  |  Branch (366:3): [True: 0, False: 1.59k]
  ------------------
  367|      0|    __builtin_unreachable();
  368|  1.59k|  }
  369|      0|  __builtin_unreachable();
  370|  1.59k|}
LJpegDecompressor.cpp:_ZNK8rawspeed17LJpegDecompressor7decodeNIL_ZNS_12_GLOBAL__N_13MCUILi4ELi1EEEEEEjv:
  255|    785|ByteStream::size_type LJpegDecompressor::decodeN() const {
  256|    785|  invariant(MCU == this->frame.mcu);
  ------------------
  |  |   27|    785|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (256:3): [True: 785, False: 0]
  ------------------
  257|       |
  258|    785|  invariant(MCU.hasPositiveArea());
  ------------------
  |  |   27|    785|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (258:3): [True: 785, False: 0]
  ------------------
  259|       |  // FIXME: workarounding lack of constexpr std::abs() :(
  260|    785|  constexpr int N_COMP = MCU.x * MCU.y;
  261|       |
  262|    785|  invariant(mRaw->getCpp() > 0);
  ------------------
  |  |   27|    785|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (262:3): [True: 785, False: 0]
  ------------------
  263|       |
  264|    785|  const auto img =
  265|    785|      CroppedArray2DRef(mRaw->getU16DataAsUncroppedArray2DRef(),
  266|    785|                        mRaw->getCpp() * imgFrame.pos.x, imgFrame.pos.y,
  267|    785|                        mRaw->getCpp() * imgFrame.dim.x, imgFrame.dim.y)
  268|    785|          .getAsArray2DRef();
  269|       |
  270|    785|  const auto ht = getPrefixCodeDecoders<N_COMP>();
  271|       |
  272|       |  // A recoded DNG might be split up into tiles of self contained LJpeg blobs.
  273|       |  // The tiles at the bottom and the right may extend beyond the dimension of
  274|       |  // the raw image buffer. The excessive content has to be ignored.
  275|       |
  276|    785|  invariant(imgFrame.dim.y % frame.mcu.y == 0);
  ------------------
  |  |   27|    785|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (276:3): [True: 785, False: 0]
  ------------------
  277|    785|  const auto numRestartIntervals = implicit_cast<int>(roundUpDivisionSafe(
  278|    785|      imgFrame.dim.y / frame.mcu.y, numLJpegRowsPerRestartInterval));
  279|    785|  invariant(numRestartIntervals >= 0);
  ------------------
  |  |   27|    785|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (279:3): [True: 785, False: 0]
  ------------------
  280|    785|  invariant(numRestartIntervals != 0);
  ------------------
  |  |   27|    785|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (280:3): [True: 785, False: 0]
  ------------------
  281|       |
  282|    785|  ByteStream inputStream(DataBuffer(input, Endianness::little));
  283|    785|  for (int restartIntervalIndex = 0;
  284|  1.62k|       restartIntervalIndex != numRestartIntervals; ++restartIntervalIndex) {
  ------------------
  |  Branch (284:8): [True: 859, False: 764]
  ------------------
  285|    859|    auto predStorage = getInitialPreds<N_COMP>();
  286|    859|    auto pred = Array2DRef(predStorage.data(), MCU.x, MCU.y);
  287|       |
  288|    859|    if (restartIntervalIndex != 0) {
  ------------------
  |  Branch (288:9): [True: 74, False: 785]
  ------------------
  289|     74|      auto marker = peekMarker(inputStream);
  290|     74|      if (!marker) // FIXME: can there be padding bytes before the marker?
  ------------------
  |  Branch (290:11): [True: 10, False: 64]
  ------------------
  291|     74|        ThrowRDE("Jpeg marker not encountered");
  ------------------
  |  |   38|     10|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     10|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     10|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     10|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  292|     64|      Optional<int> number = getRestartMarkerNumber(*marker);
  293|     64|      if (!number)
  ------------------
  |  Branch (293:11): [True: 7, False: 57]
  ------------------
  294|     64|        ThrowRDE("Not a restart marker!");
  ------------------
  |  |   38|      7|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      7|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      7|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      7|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  295|     57|      if (*number != ((restartIntervalIndex - 1) % 8))
  ------------------
  |  Branch (295:11): [True: 4, False: 53]
  ------------------
  296|     57|        ThrowRDE("Unexpected restart marker found");
  ------------------
  |  |   38|      4|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      4|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      4|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      4|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  297|     53|      inputStream.skipBytes(2); // Good restart marker.
  298|     53|    }
  299|       |
  300|    838|    BitStreamerJPEG bs(inputStream.peekRemainingBuffer().getAsArray1DRef());
  301|       |
  302|    838|    for (int ljpegRowOfRestartInterval = 0;
  303|  6.49k|         ljpegRowOfRestartInterval != numLJpegRowsPerRestartInterval;
  ------------------
  |  Branch (303:10): [True: 5.74k, False: 751]
  ------------------
  304|  5.74k|         ++ljpegRowOfRestartInterval) {
  305|  5.74k|      const int row =
  306|  5.74k|          frame.mcu.y * (numLJpegRowsPerRestartInterval * restartIntervalIndex +
  307|  5.74k|                         ljpegRowOfRestartInterval);
  308|  5.74k|      invariant(row >= 0);
  ------------------
  |  |   27|  5.74k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (308:7): [True: 5.74k, False: 0]
  ------------------
  309|  5.74k|      invariant(row <= imgFrame.dim.y);
  ------------------
  |  |   27|  5.74k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (309:7): [True: 5.74k, False: 0]
  ------------------
  310|       |
  311|       |      // For y, we can simply stop decoding when we reached the border.
  312|  5.74k|      if (row == imgFrame.dim.y) {
  ------------------
  |  Branch (312:11): [True: 87, False: 5.65k]
  ------------------
  313|     87|        invariant((restartIntervalIndex + 1) == numRestartIntervals);
  ------------------
  |  |   27|     87|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (313:9): [True: 87, False: 0]
  ------------------
  314|     87|        break;
  315|     87|      }
  316|       |
  317|  5.65k|      const auto outStripe = CroppedArray2DRef(img,
  318|  5.65k|                                               /*offsetCols=*/0,
  319|  5.65k|                                               /*offsetRows=*/row,
  320|  5.65k|                                               /*croppedWidth=*/img.width(),
  321|  5.65k|                                               /*croppedHeight=*/frame.mcu.y)
  322|  5.65k|                                 .getAsArray2DRef();
  323|       |
  324|  5.65k|      decodeRowN<MCU, N_COMP>(outStripe, pred, ht, bs);
  325|       |
  326|       |      // The predictor for the next line is the start of this line.
  327|  5.65k|      pred = CroppedArray2DRef(outStripe,
  328|  5.65k|                               /*offsetCols=*/0,
  329|  5.65k|                               /*offsetRows=*/0,
  330|  5.65k|                               /*croppedWidth=*/MCU.x,
  331|  5.65k|                               /*croppedHeight=*/MCU.y)
  332|  5.65k|                 .getAsArray2DRef();
  333|  5.65k|    }
  334|       |
  335|    838|    inputStream.skipBytes(bs.getStreamPosition());
  336|    838|  }
  337|       |
  338|    764|  return inputStream.getPosition();
  339|    785|}
_ZNK8rawspeed17LJpegDecompressor21getPrefixCodeDecodersILi4EEENSt3__15arrayINS2_17reference_wrapperIKNS_20PrefixCodeLUTDecoderINS_15BaselineCodeTagENS_23PrefixCodeLookupDecoderIS6_EEEEEEXT_EEEv:
  164|  1.59k|LJpegDecompressor::getPrefixCodeDecoders() const {
  165|  1.59k|  return getPrefixCodeDecodersImpl<N_COMP>(std::make_index_sequence<N_COMP>{});
  166|  1.59k|}
_ZNK8rawspeed17LJpegDecompressor25getPrefixCodeDecodersImplILi4EJLm0ELm1ELm2ELm3EEEENSt3__15arrayINS2_17reference_wrapperIKNS_20PrefixCodeLUTDecoderINS_15BaselineCodeTagENS_23PrefixCodeLookupDecoderIS6_EEEEEEXT_EEENS2_16integer_sequenceImJXspT0_EEEE:
  157|  1.59k|    std::index_sequence<I...> /*unused*/) const {
  158|  1.59k|  return std::array<std::reference_wrapper<const PrefixCodeDecoder<>>, N_COMP>{
  159|  1.59k|      std::cref(rec[I].ht)...};
  160|  1.59k|}
_ZNK8rawspeed17LJpegDecompressor15getInitialPredsILi4EEENSt3__15arrayItXT_EEEv:
  169|  1.74k|std::array<uint16_t, N_COMP> LJpegDecompressor::getInitialPreds() const {
  170|  1.74k|  std::array<uint16_t, N_COMP> preds;
  171|  1.74k|  std::transform(
  172|  1.74k|      rec.begin(), rec.end(), preds.begin(),
  173|  1.74k|      [](const PerComponentRecipe& compRec) { return compRec.initPred; });
  174|  1.74k|  return preds;
  175|  1.74k|}
_ZZNK8rawspeed17LJpegDecompressor15getInitialPredsILi4EEENSt3__15arrayItXT_EEEvENKUlRKNS0_18PerComponentRecipeEE_clES7_:
  173|  6.99k|      [](const PerComponentRecipe& compRec) { return compRec.initPred; });
LJpegDecompressor.cpp:_ZNK8rawspeed17LJpegDecompressor10decodeRowNIL_ZNS_12_GLOBAL__N_13MCUILi4ELi1EEEELi4EEEvNS_10Array2DRefItEENS4_IKtEENSt3__15arrayINS8_17reference_wrapperIKNS_20PrefixCodeLUTDecoderINS_15BaselineCodeTagENS_23PrefixCodeLookupDecoderISC_EEEEEEXT0_EEERNS_15BitStreamerJPEGE:
  188|  5.65k|    BitStreamerJPEG& bs) const {
  189|  5.65k|  invariant(MCUSize.area() == N_COMP);
  ------------------
  |  |   27|  5.65k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (189:3): [True: 5.65k, False: 0]
  ------------------
  190|  5.65k|  invariant(outStripe.width() >= MCUSize.x);
  ------------------
  |  |   27|  5.65k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (190:3): [True: 5.65k, False: 0]
  ------------------
  191|  5.65k|  invariant(outStripe.height() == MCUSize.y);
  ------------------
  |  |   27|  5.65k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (191:3): [True: 5.65k, False: 0]
  ------------------
  192|  5.65k|  invariant(pred.width() == MCUSize.x);
  ------------------
  |  |   27|  5.65k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (192:3): [True: 5.65k, False: 0]
  ------------------
  193|  5.65k|  invariant(pred.height() == MCUSize.y);
  ------------------
  |  |   27|  5.65k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (193:3): [True: 5.65k, False: 0]
  ------------------
  194|       |
  195|       |  // FIXME: predictor may have value outside of the uint16_t.
  196|       |  // https://github.com/darktable-org/rawspeed/issues/175
  197|       |
  198|  5.65k|  int mcuIdx = 0;
  199|       |  // For x, we first process all full pixel MCUs within the image buffer ...
  200|   101k|  for (; mcuIdx < numFullMCUs; ++mcuIdx) {
  ------------------
  |  Branch (200:10): [True: 96.3k, False: 5.65k]
  ------------------
  201|  96.3k|    const auto outTile = CroppedArray2DRef(outStripe,
  202|  96.3k|                                           /*offsetCols=*/MCUSize.x * mcuIdx,
  203|  96.3k|                                           /*offsetRows=*/0,
  204|  96.3k|                                           /*croppedWidth=*/MCUSize.x,
  205|  96.3k|                                           /*croppedHeight=*/MCUSize.y)
  206|  96.3k|                             .getAsArray2DRef();
  207|   192k|    for (int MCURow = 0; MCURow != MCUSize.y; ++MCURow) {
  ------------------
  |  Branch (207:26): [True: 96.3k, False: 96.3k]
  ------------------
  208|   481k|      for (int MCUСol = 0; MCUСol != MCUSize.x; ++MCUСol) {
  ------------------
  |  Branch (208:29): [True: 384k, False: 96.3k]
  ------------------
  209|   384k|        int c = (MCUSize.x * MCURow) + MCUСol;
  210|   384k|        int prediction = pred(MCURow, MCUСol);
  211|   384k|        int diff = (static_cast<const PrefixCodeDecoder<>&>(ht[c]))
  212|   384k|                       .decodeDifference(bs);
  213|   384k|        int pix = prediction + diff;
  214|   384k|        outTile(MCURow, MCUСol) = uint16_t(pix);
  215|   384k|      }
  216|  96.3k|    }
  217|       |    // The predictor for the next MCU of the row is the just-decoded MCU.
  218|  96.3k|    pred = outTile;
  219|  96.3k|  }
  220|       |
  221|       |  // Sometimes we also need to consume one more MCU, and produce part of it.
  222|  5.65k|  if (trailingPixels != 0) {
  ------------------
  |  Branch (222:7): [True: 4.32k, False: 1.32k]
  ------------------
  223|       |    // Some rather esoteric DNG's have odd dimensions, e.g. width % 2 = 1.
  224|       |    // We may end up needing just part of last N_COMP pixels.
  225|  4.32k|    invariant(trailingPixels > 0);
  ------------------
  |  |   27|  4.32k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (225:5): [True: 4.32k, False: 0]
  ------------------
  226|  4.32k|    invariant(trailingPixels < N_COMP);
  ------------------
  |  |   27|  4.32k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (226:5): [True: 4.32k, False: 0]
  ------------------
  227|  4.32k|    invariant(N_COMP > 1 && "can't want part of 1-pixel-wide block");
  ------------------
  |  |   27|  4.32k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (227:5): [True: 0, Folded]
  |  Branch (227:5): [True: 0, Folded]
  |  Branch (227:5): [True: 4.32k, Folded]
  ------------------
  228|       |    // Some rather esoteric DNG's have odd dimensions, e.g. width % 2 = 1.
  229|       |    // We may end up needing just part of last N_COMP pixels.
  230|  8.65k|    for (int MCURow = 0; MCURow != MCUSize.y; ++MCURow) {
  ------------------
  |  Branch (230:26): [True: 4.32k, False: 4.32k]
  ------------------
  231|  21.5k|      for (int MCUСol = 0; MCUСol != MCUSize.x; ++MCUСol) {
  ------------------
  |  Branch (231:29): [True: 17.2k, False: 4.32k]
  ------------------
  232|  17.2k|        int c = (MCUSize.x * MCURow) + MCUСol;
  233|  17.2k|        int prediction = pred(MCURow, MCUСol);
  234|  17.2k|        int diff = (static_cast<const PrefixCodeDecoder<>&>(ht[c]))
  235|  17.2k|                       .decodeDifference(bs);
  236|  17.2k|        int pix = prediction + diff;
  237|  17.2k|        int stripeRow = MCURow;
  238|  17.2k|        int stripeCol = (MCUSize.x * mcuIdx) + MCUСol;
  239|  17.2k|        if (stripeCol < outStripe.width())
  ------------------
  |  Branch (239:13): [True: 8.05k, False: 9.20k]
  ------------------
  240|  8.05k|          outStripe(stripeRow, stripeCol) = uint16_t(pix);
  241|  17.2k|      }
  242|  4.32k|    }
  243|  4.32k|    ++mcuIdx; // We did just process one more MCU.
  244|  4.32k|  }
  245|       |
  246|       |  // ... and discard the rest.
  247|  2.21M|  for (; mcuIdx < frame.dim.x; ++mcuIdx) {
  ------------------
  |  Branch (247:10): [True: 2.21M, False: 5.65k]
  ------------------
  248|  11.0M|    for (int i = 0; i != N_COMP; ++i)
  ------------------
  |  Branch (248:21): [True: 8.84M, False: 2.21M]
  ------------------
  249|  8.84M|      (static_cast<const PrefixCodeDecoder<>&>(ht[i])).decodeDifference(bs);
  250|  2.21M|  }
  251|  5.65k|}
LJpegDecompressor.cpp:_ZNK8rawspeed17LJpegDecompressor7decodeNIL_ZNS_12_GLOBAL__N_13MCUILi2ELi2EEEEEEjv:
  255|    810|ByteStream::size_type LJpegDecompressor::decodeN() const {
  256|    810|  invariant(MCU == this->frame.mcu);
  ------------------
  |  |   27|    810|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (256:3): [True: 810, False: 0]
  ------------------
  257|       |
  258|    810|  invariant(MCU.hasPositiveArea());
  ------------------
  |  |   27|    810|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (258:3): [True: 810, False: 0]
  ------------------
  259|       |  // FIXME: workarounding lack of constexpr std::abs() :(
  260|    810|  constexpr int N_COMP = MCU.x * MCU.y;
  261|       |
  262|    810|  invariant(mRaw->getCpp() > 0);
  ------------------
  |  |   27|    810|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (262:3): [True: 810, False: 0]
  ------------------
  263|       |
  264|    810|  const auto img =
  265|    810|      CroppedArray2DRef(mRaw->getU16DataAsUncroppedArray2DRef(),
  266|    810|                        mRaw->getCpp() * imgFrame.pos.x, imgFrame.pos.y,
  267|    810|                        mRaw->getCpp() * imgFrame.dim.x, imgFrame.dim.y)
  268|    810|          .getAsArray2DRef();
  269|       |
  270|    810|  const auto ht = getPrefixCodeDecoders<N_COMP>();
  271|       |
  272|       |  // A recoded DNG might be split up into tiles of self contained LJpeg blobs.
  273|       |  // The tiles at the bottom and the right may extend beyond the dimension of
  274|       |  // the raw image buffer. The excessive content has to be ignored.
  275|       |
  276|    810|  invariant(imgFrame.dim.y % frame.mcu.y == 0);
  ------------------
  |  |   27|    810|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (276:3): [True: 810, False: 0]
  ------------------
  277|    810|  const auto numRestartIntervals = implicit_cast<int>(roundUpDivisionSafe(
  278|    810|      imgFrame.dim.y / frame.mcu.y, numLJpegRowsPerRestartInterval));
  279|    810|  invariant(numRestartIntervals >= 0);
  ------------------
  |  |   27|    810|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (279:3): [True: 810, False: 0]
  ------------------
  280|    810|  invariant(numRestartIntervals != 0);
  ------------------
  |  |   27|    810|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (280:3): [True: 810, False: 0]
  ------------------
  281|       |
  282|    810|  ByteStream inputStream(DataBuffer(input, Endianness::little));
  283|    810|  for (int restartIntervalIndex = 0;
  284|  1.67k|       restartIntervalIndex != numRestartIntervals; ++restartIntervalIndex) {
  ------------------
  |  Branch (284:8): [True: 889, False: 788]
  ------------------
  285|    889|    auto predStorage = getInitialPreds<N_COMP>();
  286|    889|    auto pred = Array2DRef(predStorage.data(), MCU.x, MCU.y);
  287|       |
  288|    889|    if (restartIntervalIndex != 0) {
  ------------------
  |  Branch (288:9): [True: 79, False: 810]
  ------------------
  289|     79|      auto marker = peekMarker(inputStream);
  290|     79|      if (!marker) // FIXME: can there be padding bytes before the marker?
  ------------------
  |  Branch (290:11): [True: 11, False: 68]
  ------------------
  291|     79|        ThrowRDE("Jpeg marker not encountered");
  ------------------
  |  |   38|     11|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     11|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     11|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     11|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  292|     68|      Optional<int> number = getRestartMarkerNumber(*marker);
  293|     68|      if (!number)
  ------------------
  |  Branch (293:11): [True: 8, False: 60]
  ------------------
  294|     68|        ThrowRDE("Not a restart marker!");
  ------------------
  |  |   38|      8|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      8|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      8|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      8|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  295|     60|      if (*number != ((restartIntervalIndex - 1) % 8))
  ------------------
  |  Branch (295:11): [True: 3, False: 57]
  ------------------
  296|     60|        ThrowRDE("Unexpected restart marker found");
  ------------------
  |  |   38|      3|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  297|     57|      inputStream.skipBytes(2); // Good restart marker.
  298|     57|    }
  299|       |
  300|    867|    BitStreamerJPEG bs(inputStream.peekRemainingBuffer().getAsArray1DRef());
  301|       |
  302|    867|    for (int ljpegRowOfRestartInterval = 0;
  303|  4.47k|         ljpegRowOfRestartInterval != numLJpegRowsPerRestartInterval;
  ------------------
  |  Branch (303:10): [True: 3.66k, False: 806]
  ------------------
  304|  3.66k|         ++ljpegRowOfRestartInterval) {
  305|  3.66k|      const int row =
  306|  3.66k|          frame.mcu.y * (numLJpegRowsPerRestartInterval * restartIntervalIndex +
  307|  3.66k|                         ljpegRowOfRestartInterval);
  308|  3.66k|      invariant(row >= 0);
  ------------------
  |  |   27|  3.66k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (308:7): [True: 3.66k, False: 0]
  ------------------
  309|  3.66k|      invariant(row <= imgFrame.dim.y);
  ------------------
  |  |   27|  3.66k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (309:7): [True: 3.66k, False: 0]
  ------------------
  310|       |
  311|       |      // For y, we can simply stop decoding when we reached the border.
  312|  3.66k|      if (row == imgFrame.dim.y) {
  ------------------
  |  Branch (312:11): [True: 61, False: 3.60k]
  ------------------
  313|     61|        invariant((restartIntervalIndex + 1) == numRestartIntervals);
  ------------------
  |  |   27|     61|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (313:9): [True: 61, False: 0]
  ------------------
  314|     61|        break;
  315|     61|      }
  316|       |
  317|  3.60k|      const auto outStripe = CroppedArray2DRef(img,
  318|  3.60k|                                               /*offsetCols=*/0,
  319|  3.60k|                                               /*offsetRows=*/row,
  320|  3.60k|                                               /*croppedWidth=*/img.width(),
  321|  3.60k|                                               /*croppedHeight=*/frame.mcu.y)
  322|  3.60k|                                 .getAsArray2DRef();
  323|       |
  324|  3.60k|      decodeRowN<MCU, N_COMP>(outStripe, pred, ht, bs);
  325|       |
  326|       |      // The predictor for the next line is the start of this line.
  327|  3.60k|      pred = CroppedArray2DRef(outStripe,
  328|  3.60k|                               /*offsetCols=*/0,
  329|  3.60k|                               /*offsetRows=*/0,
  330|  3.60k|                               /*croppedWidth=*/MCU.x,
  331|  3.60k|                               /*croppedHeight=*/MCU.y)
  332|  3.60k|                 .getAsArray2DRef();
  333|  3.60k|    }
  334|       |
  335|    867|    inputStream.skipBytes(bs.getStreamPosition());
  336|    867|  }
  337|       |
  338|    788|  return inputStream.getPosition();
  339|    810|}
LJpegDecompressor.cpp:_ZNK8rawspeed17LJpegDecompressor10decodeRowNIL_ZNS_12_GLOBAL__N_13MCUILi2ELi2EEEELi4EEEvNS_10Array2DRefItEENS4_IKtEENSt3__15arrayINS8_17reference_wrapperIKNS_20PrefixCodeLUTDecoderINS_15BaselineCodeTagENS_23PrefixCodeLookupDecoderISC_EEEEEEXT0_EEERNS_15BitStreamerJPEGE:
  188|  3.60k|    BitStreamerJPEG& bs) const {
  189|  3.60k|  invariant(MCUSize.area() == N_COMP);
  ------------------
  |  |   27|  3.60k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (189:3): [True: 3.60k, False: 0]
  ------------------
  190|  3.60k|  invariant(outStripe.width() >= MCUSize.x);
  ------------------
  |  |   27|  3.60k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (190:3): [True: 3.60k, False: 0]
  ------------------
  191|  3.60k|  invariant(outStripe.height() == MCUSize.y);
  ------------------
  |  |   27|  3.60k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (191:3): [True: 3.60k, False: 0]
  ------------------
  192|  3.60k|  invariant(pred.width() == MCUSize.x);
  ------------------
  |  |   27|  3.60k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (192:3): [True: 3.60k, False: 0]
  ------------------
  193|  3.60k|  invariant(pred.height() == MCUSize.y);
  ------------------
  |  |   27|  3.60k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (193:3): [True: 3.60k, False: 0]
  ------------------
  194|       |
  195|       |  // FIXME: predictor may have value outside of the uint16_t.
  196|       |  // https://github.com/darktable-org/rawspeed/issues/175
  197|       |
  198|  3.60k|  int mcuIdx = 0;
  199|       |  // For x, we first process all full pixel MCUs within the image buffer ...
  200|  1.63M|  for (; mcuIdx < numFullMCUs; ++mcuIdx) {
  ------------------
  |  Branch (200:10): [True: 1.63M, False: 3.60k]
  ------------------
  201|  1.63M|    const auto outTile = CroppedArray2DRef(outStripe,
  202|  1.63M|                                           /*offsetCols=*/MCUSize.x * mcuIdx,
  203|  1.63M|                                           /*offsetRows=*/0,
  204|  1.63M|                                           /*croppedWidth=*/MCUSize.x,
  205|  1.63M|                                           /*croppedHeight=*/MCUSize.y)
  206|  1.63M|                             .getAsArray2DRef();
  207|  4.89M|    for (int MCURow = 0; MCURow != MCUSize.y; ++MCURow) {
  ------------------
  |  Branch (207:26): [True: 3.26M, False: 1.63M]
  ------------------
  208|  9.78M|      for (int MCUСol = 0; MCUСol != MCUSize.x; ++MCUСol) {
  ------------------
  |  Branch (208:29): [True: 6.52M, False: 3.26M]
  ------------------
  209|  6.52M|        int c = (MCUSize.x * MCURow) + MCUСol;
  210|  6.52M|        int prediction = pred(MCURow, MCUСol);
  211|  6.52M|        int diff = (static_cast<const PrefixCodeDecoder<>&>(ht[c]))
  212|  6.52M|                       .decodeDifference(bs);
  213|  6.52M|        int pix = prediction + diff;
  214|  6.52M|        outTile(MCURow, MCUСol) = uint16_t(pix);
  215|  6.52M|      }
  216|  3.26M|    }
  217|       |    // The predictor for the next MCU of the row is the just-decoded MCU.
  218|  1.63M|    pred = outTile;
  219|  1.63M|  }
  220|       |
  221|       |  // Sometimes we also need to consume one more MCU, and produce part of it.
  222|  3.60k|  if (trailingPixels != 0) {
  ------------------
  |  Branch (222:7): [True: 2.86k, False: 743]
  ------------------
  223|       |    // Some rather esoteric DNG's have odd dimensions, e.g. width % 2 = 1.
  224|       |    // We may end up needing just part of last N_COMP pixels.
  225|  2.86k|    invariant(trailingPixels > 0);
  ------------------
  |  |   27|  2.86k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (225:5): [True: 2.86k, False: 0]
  ------------------
  226|  2.86k|    invariant(trailingPixels < N_COMP);
  ------------------
  |  |   27|  2.86k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (226:5): [True: 2.86k, False: 0]
  ------------------
  227|  2.86k|    invariant(N_COMP > 1 && "can't want part of 1-pixel-wide block");
  ------------------
  |  |   27|  2.86k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (227:5): [True: 0, Folded]
  |  Branch (227:5): [True: 0, Folded]
  |  Branch (227:5): [True: 2.86k, Folded]
  ------------------
  228|       |    // Some rather esoteric DNG's have odd dimensions, e.g. width % 2 = 1.
  229|       |    // We may end up needing just part of last N_COMP pixels.
  230|  8.57k|    for (int MCURow = 0; MCURow != MCUSize.y; ++MCURow) {
  ------------------
  |  Branch (230:26): [True: 5.71k, False: 2.86k]
  ------------------
  231|  17.0k|      for (int MCUСol = 0; MCUСol != MCUSize.x; ++MCUСol) {
  ------------------
  |  Branch (231:29): [True: 11.3k, False: 5.71k]
  ------------------
  232|  11.3k|        int c = (MCUSize.x * MCURow) + MCUСol;
  233|  11.3k|        int prediction = pred(MCURow, MCUСol);
  234|  11.3k|        int diff = (static_cast<const PrefixCodeDecoder<>&>(ht[c]))
  235|  11.3k|                       .decodeDifference(bs);
  236|  11.3k|        int pix = prediction + diff;
  237|  11.3k|        int stripeRow = MCURow;
  238|  11.3k|        int stripeCol = (MCUSize.x * mcuIdx) + MCUСol;
  239|  11.3k|        if (stripeCol < outStripe.width())
  ------------------
  |  Branch (239:13): [True: 5.66k, False: 5.71k]
  ------------------
  240|  5.66k|          outStripe(stripeRow, stripeCol) = uint16_t(pix);
  241|  11.3k|      }
  242|  5.71k|    }
  243|  2.86k|    ++mcuIdx; // We did just process one more MCU.
  244|  2.86k|  }
  245|       |
  246|       |  // ... and discard the rest.
  247|  5.39M|  for (; mcuIdx < frame.dim.x; ++mcuIdx) {
  ------------------
  |  Branch (247:10): [True: 5.38M, False: 3.60k]
  ------------------
  248|  26.9M|    for (int i = 0; i != N_COMP; ++i)
  ------------------
  |  Branch (248:21): [True: 21.5M, False: 5.38M]
  ------------------
  249|  21.5M|      (static_cast<const PrefixCodeDecoder<>&>(ht[i])).decodeDifference(bs);
  250|  5.38M|  }
  251|  3.60k|}

_ZN8rawspeed6BufferC2EPKhj:
   68|  3.14k|      : Buffer(Array1DRef(data_, implicit_cast<int>(size_))) {}
_ZN8rawspeed6BufferC2ENS_10Array1DRefIKhEE:
   62|  44.8M|      : data(data_.begin()), size(data_.size()) {
   63|  44.8M|    assert(data);
  ------------------
  |  Branch (63:5): [True: 44.8M, False: 0]
  ------------------
   64|  44.8M|    assert(!ASan::RegionIsPoisoned(data, size));
  ------------------
  |  Branch (64:5): [True: 44.8M, False: 0]
  ------------------
   65|  44.8M|  }
_ZN8rawspeed10DataBufferC2ENS_6BufferENS_10EndiannessE:
  142|  12.5k|      : Buffer(data_), endianness(endianness_) {}
_ZNK8rawspeed10DataBuffer3getIjEET_jj:
  147|  36.7k|  [[nodiscard]] T get(size_type offset, size_type index = 0) const {
  148|  36.7k|    assert(Endianness::unknown != endianness);
  ------------------
  |  Branch (148:5): [True: 36.7k, False: 0]
  ------------------
  149|  36.7k|    assert(Endianness::little == endianness || Endianness::big == endianness);
  ------------------
  |  Branch (149:5): [True: 36.7k, False: 0]
  |  Branch (149:5): [True: 0, False: 0]
  |  Branch (149:5): [True: 36.7k, False: 0]
  ------------------
  150|       |
  151|  36.7k|    return Buffer::get<T>(getHostEndianness() == endianness, offset, index);
  152|  36.7k|  }
_ZNK8rawspeed6Buffer3getIjEET_bjj:
  108|  36.7k|                      size_type index = 0) const {
  109|  36.7k|    const Buffer buf =
  110|  36.7k|        getSubView(offset + (index * static_cast<size_type>(sizeof(T))),
  111|  36.7k|                   static_cast<size_type>(sizeof(T)));
  112|  36.7k|    return getByteSwapped<T>(buf.begin(), !inNativeByteOrder);
  113|  36.7k|  }
_ZNK8rawspeed6Buffer10getSubViewEjj:
   78|  44.8M|  [[nodiscard]] Buffer getSubView(size_type offset, size_type size_) const {
   79|  44.8M|    if (!isValid(offset, size_))
  ------------------
  |  Branch (79:9): [True: 209, False: 44.8M]
  ------------------
   80|  44.8M|      ThrowIOE("Buffer overflow: image file may be truncated");
  ------------------
  |  |   37|    209|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    209|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    209|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    209|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   81|       |
   82|  44.8M|    return getAsArray1DRef().getCrop(offset, size_).getAsArray1DRef();
   83|  44.8M|  }
_ZNK8rawspeed6Buffer7isValidEjj:
  117|  67.2M|  [[nodiscard]] bool isValid(size_type offset, size_type count = 1) const {
  118|  67.2M|    return static_cast<uint64_t>(offset) + count <=
  119|  67.2M|           static_cast<uint64_t>(getSize());
  120|  67.2M|  }
_ZNK8rawspeed6Buffer7getSizeEv:
  115|   134M|  [[nodiscard]] size_type RAWSPEED_READONLY getSize() const { return size; }
_ZNK8rawspeed6Buffer15getAsArray1DRefEv:
   70|  89.7M|  [[nodiscard]] Array1DRef<const uint8_t> getAsArray1DRef() const {
   71|  89.7M|    return {data, implicit_cast<int>(size)};
   72|  89.7M|  }
_ZNK8rawspeed6Buffer5beginEv:
   99|  44.8M|  [[nodiscard]] const uint8_t* begin() const {
  100|  44.8M|    return getAsArray1DRef().begin();
  101|  44.8M|  }
_ZNK8rawspeed6Buffer3endEv:
  102|  2.45k|  [[nodiscard]] const uint8_t* end() const { return getAsArray1DRef().end(); }
_ZNK8rawspeed10DataBuffer12getByteOrderEv:
  154|  7.81k|  [[nodiscard]] Endianness getByteOrder() const { return endianness; }
_ZN8rawspeed10DataBuffer12setByteOrderENS_10EndiannessE:
  156|  2.99k|  Endianness setByteOrder(Endianness endianness_) {
  157|  2.99k|    std::swap(endianness, endianness_);
  158|  2.99k|    return endianness_;
  159|  2.99k|  }
_ZNK8rawspeed10DataBuffer3getIhEET_jj:
  147|  22.4M|  [[nodiscard]] T get(size_type offset, size_type index = 0) const {
  148|  22.4M|    assert(Endianness::unknown != endianness);
  ------------------
  |  Branch (148:5): [True: 22.4M, False: 0]
  ------------------
  149|  22.4M|    assert(Endianness::little == endianness || Endianness::big == endianness);
  ------------------
  |  Branch (149:5): [True: 304, False: 22.4M]
  |  Branch (149:5): [True: 22.4M, False: 0]
  |  Branch (149:5): [True: 22.4M, False: 0]
  ------------------
  150|       |
  151|  22.4M|    return Buffer::get<T>(getHostEndianness() == endianness, offset, index);
  152|  22.4M|  }
_ZNK8rawspeed6Buffer3getIhEET_bjj:
  108|  22.4M|                      size_type index = 0) const {
  109|  22.4M|    const Buffer buf =
  110|  22.4M|        getSubView(offset + (index * static_cast<size_type>(sizeof(T))),
  111|  22.4M|                   static_cast<size_type>(sizeof(T)));
  112|  22.4M|    return getByteSwapped<T>(buf.begin(), !inNativeByteOrder);
  113|  22.4M|  }
_ZNK8rawspeed10DataBuffer3getItEET_jj:
  147|  11.9k|  [[nodiscard]] T get(size_type offset, size_type index = 0) const {
  148|  11.9k|    assert(Endianness::unknown != endianness);
  ------------------
  |  Branch (148:5): [True: 11.9k, False: 0]
  ------------------
  149|  11.9k|    assert(Endianness::little == endianness || Endianness::big == endianness);
  ------------------
  |  Branch (149:5): [True: 0, False: 11.9k]
  |  Branch (149:5): [True: 11.9k, False: 0]
  |  Branch (149:5): [True: 11.9k, False: 0]
  ------------------
  150|       |
  151|  11.9k|    return Buffer::get<T>(getHostEndianness() == endianness, offset, index);
  152|  11.9k|  }
_ZNK8rawspeed6Buffer3getItEET_bjj:
  108|  11.9k|                      size_type index = 0) const {
  109|  11.9k|    const Buffer buf =
  110|  11.9k|        getSubView(offset + (index * static_cast<size_type>(sizeof(T))),
  111|  11.9k|                   static_cast<size_type>(sizeof(T)));
  112|  11.9k|    return getByteSwapped<T>(buf.begin(), !inNativeByteOrder);
  113|  11.9k|  }

_ZN8rawspeed10ByteStreamC2ENS_10DataBufferE:
   50|  12.5k|  explicit ByteStream(DataBuffer buffer) : DataBuffer(buffer) {}
_ZN8rawspeed10ByteStream6getU32Ev:
  196|  36.7k|  uint32_t getU32() { return get<uint32_t>(); }
_ZN8rawspeed10ByteStream3getIjEET_v:
  159|  36.7k|  template <typename T> T get() {
  160|  36.7k|    auto ret = peek<T>();
  161|  36.7k|    pos += sizeof(T);
  162|  36.7k|    return ret;
  163|  36.7k|  }
_ZNK8rawspeed10ByteStream4peekIjEET_j:
  156|  36.7k|  template <typename T> [[nodiscard]] T peek(size_type i = 0) const {
  157|  36.7k|    return DataBuffer::get<T>(pos, i);
  158|  36.7k|  }
_ZNK8rawspeed10ByteStream12getSubStreamEjj:
   55|  7.88k|                                        size_type size_) const {
   56|  7.88k|    return ByteStream(DataBuffer(getSubView(offset, size_), getByteOrder()));
   57|  7.88k|  }
_ZNK8rawspeed10ByteStream5checkEj:
   63|  22.3M|  [[nodiscard]] size_type check(size_type bytes) const {
   64|  22.3M|    if (!isValid(pos, bytes))
  ------------------
  |  Branch (64:9): [True: 39, False: 22.3M]
  ------------------
   65|  22.3M|      ThrowIOE("Out of bounds access in ByteStream");
  ------------------
  |  |   37|     39|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     39|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     39|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     39|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   66|  22.3M|    [[maybe_unused]] Buffer tmp = getSubView(pos, bytes);
   67|  22.3M|    assert(tmp.getSize() == bytes);
  ------------------
  |  Branch (67:5): [True: 22.3M, False: 0]
  ------------------
   68|  22.3M|    assert(!ASan::RegionIsPoisoned(tmp.begin(), tmp.getSize()));
  ------------------
  |  Branch (68:5): [True: 22.3M, False: 0]
  ------------------
   69|  22.3M|    return bytes;
   70|  22.3M|  }
_ZNK8rawspeed10ByteStream11getPositionEv:
   78|    143|  [[nodiscard]] size_type getPosition() const {
   79|    143|    invariant(getSize() >= pos);
  ------------------
  |  |   27|    143|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (79:5): [True: 143, False: 0]
  ------------------
   80|    143|    (void)check(0);
   81|    143|    return pos;
   82|    143|  }
_ZNK8rawspeed10ByteStream13getRemainSizeEv:
   87|  11.1M|  [[nodiscard]] size_type RAWSPEED_READONLY getRemainSize() const {
   88|  11.1M|    invariant(getSize() >= pos);
  ------------------
  |  |   27|  11.1M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (88:5): [True: 11.1M, False: 0]
  ------------------
   89|  11.1M|    (void)check(0);
   90|  11.1M|    return getSize() - pos;
   91|  11.1M|  }
_ZNK8rawspeed10ByteStream10peekBufferEj:
  100|  4.88k|  [[nodiscard]] Buffer peekBuffer(size_type size_) const {
  101|  4.88k|    return getSubView(pos, size_);
  102|  4.88k|  }
_ZN8rawspeed10ByteStream9getBufferEj:
  103|  4.88k|  Buffer getBuffer(size_type size_) {
  104|  4.88k|    Buffer ret = peekBuffer(size_);
  105|  4.88k|    pos += size_;
  106|  4.88k|    return ret;
  107|  4.88k|  }
_ZNK8rawspeed10ByteStream19peekRemainingBufferEv:
  108|  3.30k|  [[nodiscard]] Buffer peekRemainingBuffer() const {
  109|  3.30k|    return getSubView(pos, getRemainSize());
  110|  3.30k|  }
_ZNK8rawspeed10ByteStream10peekStreamEj:
  111|  7.88k|  [[nodiscard]] ByteStream peekStream(size_type size_) const {
  112|  7.88k|    return getSubStream(pos, size_);
  113|  7.88k|  }
_ZN8rawspeed10ByteStream9getStreamEj:
  119|  7.88k|  ByteStream getStream(size_type size_) {
  120|  7.88k|    ByteStream ret = peekStream(size_);
  121|  7.88k|    pos += size_;
  122|  7.88k|    return ret;
  123|  7.88k|  }
_ZN8rawspeed10ByteStream9skipBytesEj:
  130|  11.1M|  void skipBytes(size_type nbytes) { pos += check(nbytes); }
_ZNK8rawspeed10ByteStream8peekByteEj:
  183|  22.3M|  [[nodiscard]] uint8_t peekByte(size_type i = 0) const {
  184|  22.3M|    return peek<uint8_t>(i);
  185|  22.3M|  }
_ZN8rawspeed10ByteStream7getByteEv:
  186|  49.6k|  uint8_t getByte() { return get<uint8_t>(); }
_ZNK8rawspeed10ByteStream7peekU16Ev:
  188|  7.92k|  [[nodiscard]] uint16_t peekU16() const { return peek<uint16_t>(); }
_ZN8rawspeed10ByteStream6getU16Ev:
  194|  4.00k|  uint16_t getU16() { return get<uint16_t>(); }
_ZNK8rawspeed10ByteStream4peekIhEET_j:
  156|  22.4M|  template <typename T> [[nodiscard]] T peek(size_type i = 0) const {
  157|  22.4M|    return DataBuffer::get<T>(pos, i);
  158|  22.4M|  }
_ZN8rawspeed10ByteStream3getIhEET_v:
  159|  49.6k|  template <typename T> T get() {
  160|  49.6k|    auto ret = peek<T>();
  161|  49.6k|    pos += sizeof(T);
  162|  49.6k|    return ret;
  163|  49.6k|  }
_ZNK8rawspeed10ByteStream4peekItEET_j:
  156|  11.9k|  template <typename T> [[nodiscard]] T peek(size_type i = 0) const {
  157|  11.9k|    return DataBuffer::get<T>(pos, i);
  158|  11.9k|  }
_ZN8rawspeed10ByteStream3getItEET_v:
  159|  4.00k|  template <typename T> T get() {
  160|  4.00k|    auto ret = peek<T>();
  161|  4.00k|    pos += sizeof(T);
  162|  4.00k|    return ret;
  163|  4.00k|  }

_ZN8rawspeed14getByteSwappedIjEET_PKvb:
  100|  3.65M|template <typename T> inline T getByteSwapped(const void* data, bool bswap) {
  101|  3.65M|  T ret;
  102|       |  // all interesting compilers optimize this memcpy into a single move
  103|       |  // this is the most effective way to load some bytes without running into
  104|       |  // alignment or aliasing issues
  105|  3.65M|  memcpy(&ret, data, sizeof(T));
  106|  3.65M|  return bswap ? getByteSwapped(ret) : ret;
  ------------------
  |  Branch (106:10): [True: 3.61M, False: 36.6k]
  ------------------
  107|  3.65M|}
_ZN8rawspeed14getByteSwappedEj:
   84|  3.61M|inline uint32_t getByteSwapped(uint32_t v) { return BSWAP32(v); }
  ------------------
  |  |   37|  3.61M|#define BSWAP32(A) __builtin_bswap32(A)
  ------------------
_ZN8rawspeed17getHostEndiannessEv:
   63|  26.0M|inline Endianness getHostEndianness() {
   64|  26.0M|#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
   65|  26.0M|  return Endianness::little;
   66|       |#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
   67|       |  return Endianness::big;
   68|       |#elif defined(__BYTE_ORDER__)
   69|       |#error "uhm, __BYTE_ORDER__ has some strange value"
   70|       |#else
   71|       |  return getHostEndiannessRuntime();
   72|       |#endif
   73|  26.0M|}
_ZN8rawspeed14getByteSwappedEh:
   76|  22.4M|inline uint8_t getByteSwapped(uint8_t v) { return v; }
_ZN8rawspeed14getByteSwappedEt:
   80|  11.8k|inline uint16_t getByteSwapped(uint16_t v) { return BSWAP16(v); }
  ------------------
  |  |   36|  11.8k|#define BSWAP16(A) __builtin_bswap16(A)
  ------------------
_ZN8rawspeed14getByteSwappedItEET_PKvb:
  100|  11.8k|template <typename T> inline T getByteSwapped(const void* data, bool bswap) {
  101|  11.8k|  T ret;
  102|       |  // all interesting compilers optimize this memcpy into a single move
  103|       |  // this is the most effective way to load some bytes without running into
  104|       |  // alignment or aliasing issues
  105|  11.8k|  memcpy(&ret, data, sizeof(T));
  106|  11.8k|  return bswap ? getByteSwapped(ret) : ret;
  ------------------
  |  Branch (106:10): [True: 11.8k, False: 0]
  ------------------
  107|  11.8k|}
_ZN8rawspeed14getByteSwappedIhEET_PKvb:
  100|  22.4M|template <typename T> inline T getByteSwapped(const void* data, bool bswap) {
  101|  22.4M|  T ret;
  102|       |  // all interesting compilers optimize this memcpy into a single move
  103|       |  // this is the most effective way to load some bytes without running into
  104|       |  // alignment or aliasing issues
  105|  22.4M|  memcpy(&ret, data, sizeof(T));
  106|  22.4M|  return bswap ? getByteSwapped(ret) : ret;
  ------------------
  |  Branch (106:10): [True: 22.4M, False: 302]
  ------------------
  107|  22.4M|}

_ZN8rawspeed16ColorFilterArrayC2Ev:
   51|  3.08k|  ColorFilterArray() = default;

_ZNSt9exceptionC2B8ne180100Ev:
   74|  3.13k|  _LIBCPP_HIDE_FROM_ABI exception() _NOEXCEPT {}

_ZNSt3__122__libcpp_aligned_allocB8ne180100Emm:
   30|  6.00k|inline _LIBCPP_HIDE_FROM_ABI void* __libcpp_aligned_alloc(std::size_t __alignment, std::size_t __size) {
   31|       |#  if defined(_LIBCPP_MSVCRT_LIKE)
   32|       |  return ::_aligned_malloc(__size, __alignment);
   33|       |#  elif _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_C11_ALIGNED_ALLOC)
   34|       |  // aligned_alloc() requires that __size is a multiple of __alignment,
   35|       |  // but for C++ [new.delete.general], only states "if the value of an
   36|       |  // alignment argument passed to any of these functions is not a valid
   37|       |  // alignment value, the behavior is undefined".
   38|       |  // To handle calls such as ::operator new(1, std::align_val_t(128)), we
   39|       |  // round __size up to the next multiple of __alignment.
   40|  6.00k|  size_t __rounded_size = (__size + __alignment - 1) & ~(__alignment - 1);
   41|       |  // Rounding up could have wrapped around to zero, so we have to add another
   42|       |  // max() ternary to the actual call site to avoid succeeded in that case.
   43|  6.00k|  return ::aligned_alloc(__alignment, __size > __rounded_size ? __size : __rounded_size);
  ------------------
  |  Branch (43:39): [True: 0, False: 6.00k]
  ------------------
   44|       |#  else
   45|       |  void* __result = nullptr;
   46|       |  (void)::posix_memalign(&__result, __alignment, __size);
   47|       |  // If posix_memalign fails, __result is unmodified so we still return `nullptr`.
   48|       |  return __result;
   49|       |#  endif
   50|  6.00k|}
_ZNSt3__121__libcpp_aligned_freeB8ne180100EPv:
   52|  6.00k|inline _LIBCPP_HIDE_FROM_ABI void __libcpp_aligned_free(void* __ptr) {
   53|       |#  if defined(_LIBCPP_MSVCRT_LIKE)
   54|       |  ::_aligned_free(__ptr);
   55|       |#  else
   56|  6.00k|  ::free(__ptr);
   57|  6.00k|#  endif
   58|  6.00k|}

_ZNSt3__121__libcpp_execute_onceB8ne180100EPiPFvvE:
  302|  9.40k|int __libcpp_execute_once(__libcpp_exec_once_flag* __flag, void (*__init_routine)()) {
  303|  9.40k|  return pthread_once(__flag, __init_routine);
  304|  9.40k|}
_ZNSt3__119__libcpp_tls_createB8ne180100EPjPFvPvE:
  346|      1|int __libcpp_tls_create(__libcpp_tls_key* __key, void (*__at_exit)(void*)) {
  347|      1|  return pthread_key_create(__key, __at_exit);
  348|      1|}
_ZNSt3__116__libcpp_tls_getB8ne180100Ej:
  350|  9.40k|void* __libcpp_tls_get(__libcpp_tls_key __key) { return pthread_getspecific(__key); }
_ZNSt3__116__libcpp_tls_setB8ne180100EjPv:
  352|      1|int __libcpp_tls_set(__libcpp_tls_key __key, void* __p) { return pthread_setspecific(__key, __p); }

_ZNSt27__type_info_implementations13__unique_impl4__eqB8ne180100EPKcS2_:
  203|  18.5k|    _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
  204|  18.5k|      return __lhs == __rhs;
  205|  18.5k|    }
_ZNKSt9type_infoeqB8ne180100ERKS_:
  302|  18.5k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool operator==(const type_info& __arg) const _NOEXCEPT {
  303|       |    // When evaluated in a constant expression, both type infos simply can't come
  304|       |    // from different translation units, so it is sufficient to compare their addresses.
  305|  18.5k|    if (__libcpp_is_constant_evaluated()) {
  ------------------
  |  Branch (305:9): [Folded, False: 18.5k]
  ------------------
  306|      0|      return this == &__arg;
  307|      0|    }
  308|  18.5k|    return __impl::__eq(__type_name, __arg.__type_name);
  309|  18.5k|  }

memory.cpp:_ZNSt3__112_GLOBAL__N_120__libcpp_atomic_loadB8ne180100IlEET_PKS2_i:
   58|  3.08k|inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_atomic_load(_ValueType const* __val, int __order = _AO_Seq) {
   59|  3.08k|  return __atomic_load_n(__val, __order);
   60|  3.08k|}
cxa_handlers.cpp:_ZNSt3__112_GLOBAL__N_120__libcpp_atomic_loadB8ne180100IPFvvEEET_PKS4_i:
   58|  6.27k|inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_atomic_load(_ValueType const* __val, int __order = _AO_Seq) {
   59|  6.27k|  return __atomic_load_n(__val, __order);
   60|  6.27k|}
cxa_exception.cpp:_ZNSt3__112_GLOBAL__N_119__libcpp_atomic_addB8ne180100ImmEET_PS2_T0_i:
   63|  3.13k|inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_atomic_add(_ValueType* __val, _AddType __a, int __order = _AO_Seq) {
   64|  3.13k|  return __atomic_add_fetch(__val, __a, __order);
   65|  3.13k|}
stdlib_stdexcept.cpp:_ZNSt3__112_GLOBAL__N_119__libcpp_atomic_addB8ne180100IiiEET_PS2_T0_i:
   63|  3.13k|inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_atomic_add(_ValueType* __val, _AddType __a, int __order = _AO_Seq) {
   64|  3.13k|  return __atomic_add_fetch(__val, __a, __order);
   65|  3.13k|}

_ZNSt3__118__libcpp_refstringD2Ev:
  108|  3.13k|inline __libcpp_refstring::~__libcpp_refstring() {
  109|  3.13k|  if (__uses_refcount()) {
  ------------------
  |  Branch (109:7): [True: 3.13k, False: 0]
  ------------------
  110|  3.13k|    _Rep_base* rep = rep_from_data(__imp_);
  111|  3.13k|    if (__libcpp_atomic_add(&rep->count, count_t(-1)) < 0) {
  ------------------
  |  Branch (111:9): [True: 3.13k, False: 0]
  ------------------
  112|  3.13k|      ::operator delete(rep);
  113|  3.13k|    }
  114|  3.13k|  }
  115|  3.13k|}
_ZNKSt3__118__libcpp_refstring15__uses_refcountEv:
  117|  3.13k|inline bool __libcpp_refstring::__uses_refcount() const {
  118|       |#if defined(_LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE)
  119|       |  return __imp_ != get_gcc_empty_string_storage();
  120|       |#else
  121|  3.13k|  return true;
  122|  3.13k|#endif
  123|  3.13k|}
stdlib_stdexcept.cpp:_ZNSt3__115__refstring_imp12_GLOBAL__N_113rep_from_dataEPKc:
   46|  3.13k|inline _Rep_base* rep_from_data(const char* data_) noexcept {
   47|  3.13k|  char* data = const_cast<char*>(data_);
   48|  3.13k|  return reinterpret_cast<_Rep_base*>(data - sizeof(_Rep_base));
   49|  3.13k|}
_ZNSt3__118__libcpp_refstringC2EPKc:
   78|  3.13k|inline __libcpp_refstring::__libcpp_refstring(const char* msg) {
   79|  3.13k|  std::size_t len = strlen(msg);
   80|  3.13k|  _Rep_base* rep  = static_cast<_Rep_base*>(::operator new(sizeof(*rep) + len + 1));
   81|  3.13k|  rep->len        = len;
   82|  3.13k|  rep->cap        = len;
   83|  3.13k|  rep->count      = 0;
   84|  3.13k|  char* data      = data_from_rep(rep);
   85|  3.13k|  std::memcpy(data, msg, len + 1);
   86|  3.13k|  __imp_ = data;
   87|  3.13k|}
stdexcept.cpp:_ZNSt3__115__refstring_imp12_GLOBAL__N_113data_from_repEPNS1_9_Rep_baseE:
   51|  3.13k|inline char* data_from_rep(_Rep_base* rep) noexcept {
   52|  3.13k|  char* data = reinterpret_cast<char*>(rep);
   53|  3.13k|  return data + sizeof(*rep);
   54|  3.13k|}

_ZNSt3__119__shared_weak_count14__release_weakEv:
   57|  3.08k|void __shared_weak_count::__release_weak() noexcept {
   58|       |  // NOTE: The acquire load here is an optimization of the very
   59|       |  // common case where a shared pointer is being destructed while
   60|       |  // having no other contended references.
   61|       |  //
   62|       |  // BENEFIT: We avoid expensive atomic stores like XADD and STREX
   63|       |  // in a common case.  Those instructions are slow and do nasty
   64|       |  // things to caches.
   65|       |  //
   66|       |  // IS THIS SAFE?  Yes.  During weak destruction, if we see that we
   67|       |  // are the last reference, we know that no-one else is accessing
   68|       |  // us. If someone were accessing us, then they would be doing so
   69|       |  // while the last shared / weak_ptr was being destructed, and
   70|       |  // that's undefined anyway.
   71|       |  //
   72|       |  // If we see anything other than a 0, then we have possible
   73|       |  // contention, and need to use an atomicrmw primitive.
   74|       |  // The same arguments don't apply for increment, where it is legal
   75|       |  // (though inadvisable) to share shared_ptr references between
   76|       |  // threads, and have them all get copied at once.  The argument
   77|       |  // also doesn't apply for __release_shared, because an outstanding
   78|       |  // weak_ptr::lock() could read / modify the shared count.
   79|  3.08k|  if (__libcpp_atomic_load(&__shared_weak_owners_, _AO_Acquire) == 0) {
  ------------------
  |  Branch (79:7): [True: 3.08k, False: 0]
  ------------------
   80|       |    // no need to do this store, because we are about
   81|       |    // to destroy everything.
   82|       |    //__libcpp_atomic_store(&__shared_weak_owners_, -1, _AO_Release);
   83|  3.08k|    __on_zero_shared_weak();
   84|  3.08k|  } else if (__libcpp_atomic_refcount_decrement(__shared_weak_owners_) == -1)
  ------------------
  |  Branch (84:14): [True: 0, False: 0]
  ------------------
   85|      0|    __on_zero_shared_weak();
   86|  3.08k|}

_ZNSt13runtime_errorC2EPKc:
   34|  3.13k|runtime_error::runtime_error(const char* msg) : __imp_(msg) {}

_ZN10__cxxabiv119__setExceptionClassEP17_Unwind_Exceptionm:
   81|  3.13k|void __setExceptionClass(_Unwind_Exception* unwind_exception, uint64_t newValue) {
   82|  3.13k|    ::memcpy(&unwind_exception->exception_class, &newValue, sizeof(newValue));
   83|  3.13k|}
_ZN10__cxxabiv119__getExceptionClassEPK17_Unwind_Exception:
   95|  12.5k|uint64_t __getExceptionClass(const _Unwind_Exception* unwind_exception) {
   96|       |    // On x86 and some ARM unwinders, unwind_exception->exception_class is
   97|       |    // a uint64_t. On other ARM unwinders, it is a char[8].
   98|       |    // See: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf
   99|       |    // So we just copy it into a uint64_t to be sure.
  100|  12.5k|    uint64_t exClass;
  101|  12.5k|    ::memcpy(&exClass, &unwind_exception->exception_class, sizeof(exClass));
  102|  12.5k|    return exClass;
  103|  12.5k|}
_ZN10__cxxabiv121__isOurExceptionClassEPK17_Unwind_Exception:
  105|  6.27k|bool __isOurExceptionClass(const _Unwind_Exception* unwind_exception) {
  106|  6.27k|    return (__getExceptionClass(unwind_exception) & get_vendor_and_language) ==
  107|  6.27k|           (kOurExceptionClass                    & get_vendor_and_language);
  108|  6.27k|}
__cxa_allocate_exception:
  183|  3.13k|void *__cxa_allocate_exception(size_t thrown_size) throw() {
  184|  3.13k|    size_t actual_size = cxa_exception_size_from_exception_thrown_size(thrown_size);
  185|       |
  186|       |    // Allocate extra space before the __cxa_exception header to ensure the
  187|       |    // start of the thrown object is sufficiently aligned.
  188|  3.13k|    size_t header_offset = get_cxa_exception_offset();
  189|  3.13k|    char *raw_buffer =
  190|  3.13k|        (char *)__aligned_malloc_with_fallback(header_offset + actual_size);
  191|  3.13k|    if (NULL == raw_buffer)
  ------------------
  |  Branch (191:9): [True: 0, False: 3.13k]
  ------------------
  192|      0|        std::terminate();
  193|  3.13k|    __cxa_exception *exception_header =
  194|  3.13k|        static_cast<__cxa_exception *>((void *)(raw_buffer + header_offset));
  195|  3.13k|    ::memset(exception_header, 0, actual_size);
  196|  3.13k|    return thrown_object_from_cxa_exception(exception_header);
  197|  3.13k|}
__cxa_free_exception:
  201|  3.13k|void __cxa_free_exception(void *thrown_object) throw() {
  202|       |    // Compute the size of the padding before the header.
  203|  3.13k|    size_t header_offset = get_cxa_exception_offset();
  204|  3.13k|    char *raw_buffer =
  205|  3.13k|        ((char *)cxa_exception_from_thrown_object(thrown_object)) - header_offset;
  206|  3.13k|    __aligned_free_with_fallback((void *)raw_buffer);
  207|  3.13k|}
__cxa_init_primary_exception:
  210|  3.13k|                                              void(_LIBCXXABI_DTOR_FUNC* dest)(void*)) throw() {
  211|  3.13k|  __cxa_exception* exception_header = cxa_exception_from_thrown_object(object);
  212|  3.13k|  exception_header->referenceCount = 0;
  213|  3.13k|  exception_header->unexpectedHandler = std::get_unexpected();
  214|  3.13k|  exception_header->terminateHandler = std::get_terminate();
  215|  3.13k|  exception_header->exceptionType = tinfo;
  216|  3.13k|  exception_header->exceptionDestructor = dest;
  217|  3.13k|  setOurExceptionClass(&exception_header->unwindHeader);
  218|  3.13k|  exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
  219|       |
  220|  3.13k|  return exception_header;
  221|  3.13k|}
__cxa_throw:
  274|  3.13k|__cxa_throw(void *thrown_object, std::type_info *tinfo, void (_LIBCXXABI_DTOR_FUNC *dest)(void *)) {
  275|  3.13k|#endif
  276|  3.13k|  __cxa_eh_globals* globals = __cxa_get_globals();
  277|  3.13k|  globals->uncaughtExceptions += 1; // Not atomically, since globals are thread-local
  278|       |
  279|  3.13k|  __cxa_exception* exception_header = __cxa_init_primary_exception(thrown_object, tinfo, dest);
  280|  3.13k|  exception_header->referenceCount = 1; // This is a newly allocated exception, no need for thread safety.
  281|       |
  282|       |#if __has_feature(address_sanitizer)
  283|       |  // Inform the ASan runtime that now might be a good time to clean stuff up.
  284|       |  __asan_handle_no_return();
  285|       |#endif
  286|       |
  287|       |#ifdef __USING_SJLJ_EXCEPTIONS__
  288|       |    _Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
  289|       |#else
  290|  3.13k|    _Unwind_RaiseException(&exception_header->unwindHeader);
  291|  3.13k|#endif
  292|       |    //  This only happens when there is no handler, or some unexpected unwinding
  293|       |    //     error happens.
  294|  3.13k|    failed_throw(exception_header);
  295|  3.13k|}
__cxa_begin_catch:
  446|  3.13k|{
  447|  3.13k|    _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(unwind_arg);
  448|  3.13k|    bool native_exception = __isOurExceptionClass(unwind_exception);
  449|  3.13k|    __cxa_eh_globals* globals = __cxa_get_globals();
  450|       |    // exception_header is a hackish offset from a foreign exception, but it
  451|       |    //   works as long as we're careful not to try to access any __cxa_exception
  452|       |    //   parts.
  453|  3.13k|    __cxa_exception* exception_header =
  454|  3.13k|            cxa_exception_from_exception_unwind_exception
  455|  3.13k|            (
  456|  3.13k|                static_cast<_Unwind_Exception*>(unwind_exception)
  457|  3.13k|            );
  458|       |
  459|       |#if defined(__MVS__)
  460|       |    // Remove the exception object from the linked list of exceptions that the z/OS unwinder
  461|       |    // maintains before adding it to the libc++abi list of caught exceptions.
  462|       |    // The libc++abi will manage the lifetime of the exception from this point forward.
  463|       |    _UnwindZOS_PopException();
  464|       |#endif
  465|       |
  466|  3.13k|    if (native_exception)
  ------------------
  |  Branch (466:9): [True: 3.13k, False: 0]
  ------------------
  467|  3.13k|    {
  468|       |        // Increment the handler count, removing the flag about being rethrown
  469|  3.13k|        exception_header->handlerCount = exception_header->handlerCount < 0 ?
  ------------------
  |  Branch (469:42): [True: 0, False: 3.13k]
  ------------------
  470|  3.13k|            -exception_header->handlerCount + 1 : exception_header->handlerCount + 1;
  471|       |        //  place the exception on the top of the stack if it's not already
  472|       |        //    there by a previous rethrow
  473|  3.13k|        if (exception_header != globals->caughtExceptions)
  ------------------
  |  Branch (473:13): [True: 3.13k, False: 0]
  ------------------
  474|  3.13k|        {
  475|  3.13k|            exception_header->nextException = globals->caughtExceptions;
  476|  3.13k|            globals->caughtExceptions = exception_header;
  477|  3.13k|        }
  478|  3.13k|        globals->uncaughtExceptions -= 1;   // Not atomically, since globals are thread-local
  479|       |#if defined(_LIBCXXABI_ARM_EHABI)
  480|       |        return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]);
  481|       |#else
  482|  3.13k|        return exception_header->adjustedPtr;
  483|  3.13k|#endif
  484|  3.13k|    }
  485|       |    // Else this is a foreign exception
  486|       |    // If the caughtExceptions stack is not empty, terminate
  487|      0|    if (globals->caughtExceptions != 0)
  ------------------
  |  Branch (487:9): [True: 0, False: 0]
  ------------------
  488|      0|        std::terminate();
  489|       |    // Push the foreign exception on to the stack
  490|      0|    globals->caughtExceptions = exception_header;
  491|      0|    return unwind_exception + 1;
  492|  3.13k|}
__cxa_end_catch:
  513|  3.13k|void __cxa_end_catch() {
  514|  3.13k|  static_assert(sizeof(__cxa_exception) == sizeof(__cxa_dependent_exception),
  515|  3.13k|                "sizeof(__cxa_exception) must be equal to "
  516|  3.13k|                "sizeof(__cxa_dependent_exception)");
  517|  3.13k|  static_assert(__builtin_offsetof(__cxa_exception, referenceCount) ==
  518|  3.13k|                    __builtin_offsetof(__cxa_dependent_exception,
  519|  3.13k|                                       primaryException),
  520|  3.13k|                "the layout of __cxa_exception must match the layout of "
  521|  3.13k|                "__cxa_dependent_exception");
  522|  3.13k|  static_assert(__builtin_offsetof(__cxa_exception, handlerCount) ==
  523|  3.13k|                    __builtin_offsetof(__cxa_dependent_exception, handlerCount),
  524|  3.13k|                "the layout of __cxa_exception must match the layout of "
  525|  3.13k|                "__cxa_dependent_exception");
  526|  3.13k|    __cxa_eh_globals* globals = __cxa_get_globals_fast(); // __cxa_get_globals called in __cxa_begin_catch
  527|  3.13k|    __cxa_exception* exception_header = globals->caughtExceptions;
  528|       |    // If we've rethrown a foreign exception, then globals->caughtExceptions
  529|       |    //    will have been made an empty stack by __cxa_rethrow() and there is
  530|       |    //    nothing more to be done.  Do nothing!
  531|  3.13k|    if (NULL != exception_header)
  ------------------
  |  Branch (531:9): [True: 3.13k, False: 0]
  ------------------
  532|  3.13k|    {
  533|  3.13k|        bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader);
  534|  3.13k|        if (native_exception)
  ------------------
  |  Branch (534:13): [True: 3.13k, False: 0]
  ------------------
  535|  3.13k|        {
  536|       |            // This is a native exception
  537|  3.13k|            if (exception_header->handlerCount < 0)
  ------------------
  |  Branch (537:17): [True: 0, False: 3.13k]
  ------------------
  538|      0|            {
  539|       |                //  The exception has been rethrown by __cxa_rethrow, so don't delete it
  540|      0|                if (0 == incrementHandlerCount(exception_header))
  ------------------
  |  Branch (540:21): [True: 0, False: 0]
  ------------------
  541|      0|                {
  542|       |                    //  Remove from the chain of uncaught exceptions
  543|      0|                    globals->caughtExceptions = exception_header->nextException;
  544|       |                    // but don't destroy
  545|      0|                }
  546|       |                // Keep handlerCount negative in case there are nested catch's
  547|       |                //   that need to be told that this exception is rethrown.  Don't
  548|       |                //   erase this rethrow flag until the exception is recaught.
  549|      0|            }
  550|  3.13k|            else
  551|  3.13k|            {
  552|       |                // The native exception has not been rethrown
  553|  3.13k|                if (0 == decrementHandlerCount(exception_header))
  ------------------
  |  Branch (553:21): [True: 3.13k, False: 0]
  ------------------
  554|  3.13k|                {
  555|       |                    //  Remove from the chain of uncaught exceptions
  556|  3.13k|                    globals->caughtExceptions = exception_header->nextException;
  557|       |                    // Destroy this exception, being careful to distinguish
  558|       |                    //    between dependent and primary exceptions
  559|  3.13k|                    if (isDependentException(&exception_header->unwindHeader))
  ------------------
  |  Branch (559:25): [True: 0, False: 3.13k]
  ------------------
  560|      0|                    {
  561|       |                        // Reset exception_header to primaryException and deallocate the dependent exception
  562|      0|                        __cxa_dependent_exception* dep_exception_header =
  563|      0|                            reinterpret_cast<__cxa_dependent_exception*>(exception_header);
  564|      0|                        exception_header =
  565|      0|                            cxa_exception_from_thrown_object(dep_exception_header->primaryException);
  566|      0|                        __cxa_free_dependent_exception(dep_exception_header);
  567|      0|                    }
  568|       |                    // Destroy the primary exception only if its referenceCount goes to 0
  569|       |                    //    (this decrement must be atomic)
  570|  3.13k|                    __cxa_decrement_exception_refcount(thrown_object_from_cxa_exception(exception_header));
  571|  3.13k|                }
  572|  3.13k|            }
  573|  3.13k|        }
  574|      0|        else
  575|      0|        {
  576|       |            // The foreign exception has not been rethrown.  Pop the stack
  577|       |            //    and delete it.  If there are nested catch's and they try
  578|       |            //    to touch a foreign exception in any way, that is undefined
  579|       |            //     behavior.  They likely can't since the only way to catch
  580|       |            //     a foreign exception is with catch (...)!
  581|      0|            _Unwind_DeleteException(&globals->caughtExceptions->unwindHeader);
  582|      0|            globals->caughtExceptions = 0;
  583|      0|        }
  584|  3.13k|    }
  585|  3.13k|}
__cxa_decrement_exception_refcount:
  678|  3.13k|void __cxa_decrement_exception_refcount(void *thrown_object) throw() {
  679|  3.13k|    if (thrown_object != NULL )
  ------------------
  |  Branch (679:9): [True: 3.13k, False: 0]
  ------------------
  680|  3.13k|    {
  681|  3.13k|        __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
  682|  3.13k|        if (std::__libcpp_atomic_add(&exception_header->referenceCount, size_t(-1)) == 0)
  ------------------
  |  Branch (682:13): [True: 3.13k, False: 0]
  ------------------
  683|  3.13k|        {
  684|  3.13k|            if (NULL != exception_header->exceptionDestructor)
  ------------------
  |  Branch (684:17): [True: 3.13k, False: 0]
  ------------------
  685|  3.13k|                exception_header->exceptionDestructor(thrown_object);
  686|  3.13k|            __cxa_free_exception(thrown_object);
  687|  3.13k|        }
  688|  3.13k|    }
  689|  3.13k|}
cxa_exception.cpp:_ZN10__cxxabiv1L45cxa_exception_size_from_exception_thrown_sizeEm:
   76|  3.13k|size_t cxa_exception_size_from_exception_thrown_size(size_t size) {
   77|  3.13k|    return aligned_allocation_size(size + sizeof (__cxa_exception),
   78|  3.13k|                                   alignof(__cxa_exception));
   79|  3.13k|}
cxa_exception.cpp:_ZN10__cxxabiv1L23aligned_allocation_sizeEmm:
   71|  3.13k|size_t aligned_allocation_size(size_t s, size_t a) {
   72|  3.13k|    return (s + a - 1) & ~(a - 1);
   73|  3.13k|}
cxa_exception.cpp:_ZN10__cxxabiv1L24get_cxa_exception_offsetEv:
  161|  6.27k|static size_t get_cxa_exception_offset() {
  162|  6.27k|  struct S {
  163|  6.27k|  } __attribute__((aligned));
  164|       |
  165|       |  // Compute the maximum alignment for the target machine.
  166|  6.27k|  constexpr size_t alignment = alignof(S);
  167|  6.27k|  constexpr size_t excp_size = sizeof(__cxa_exception);
  168|  6.27k|  constexpr size_t aligned_size =
  169|  6.27k|      (excp_size + alignment - 1) / alignment * alignment;
  170|  6.27k|  constexpr size_t offset = aligned_size - excp_size;
  171|  6.27k|  static_assert((offset == 0 || alignof(_Unwind_Exception) < alignment),
  172|  6.27k|                "offset is non-zero only if _Unwind_Exception isn't aligned");
  173|  6.27k|  return offset;
  174|  6.27k|}
cxa_exception.cpp:_ZN10__cxxabiv1L32thrown_object_from_cxa_exceptionEPNS_15__cxa_exceptionE:
   54|  6.27k|{
   55|  6.27k|    return static_cast<void*>(exception_header + 1);
   56|  6.27k|}
cxa_exception.cpp:_ZN10__cxxabiv1L32cxa_exception_from_thrown_objectEPv:
   44|  12.5k|{
   45|  12.5k|    return static_cast<__cxa_exception*>(thrown_object) - 1;
   46|  12.5k|}
cxa_exception.cpp:_ZN10__cxxabiv1L20setOurExceptionClassEP17_Unwind_Exception:
   86|  3.13k|static void setOurExceptionClass(_Unwind_Exception* unwind_exception) {
   87|  3.13k|    __setExceptionClass(unwind_exception, kOurExceptionClass);
   88|  3.13k|}
cxa_exception.cpp:_ZN10__cxxabiv1L45cxa_exception_from_exception_unwind_exceptionEP17_Unwind_Exception:
   65|  3.13k|{
   66|  3.13k|    return cxa_exception_from_thrown_object(unwind_exception + 1 );
   67|  3.13k|}
cxa_exception.cpp:_ZN10__cxxabiv1L21decrementHandlerCountEPNS_15__cxa_exceptionE:
  120|  3.13k|static inline  int decrementHandlerCount(__cxa_exception *exception) {
  121|  3.13k|    return --exception->handlerCount;
  122|  3.13k|}
cxa_exception.cpp:_ZN10__cxxabiv1L20isDependentExceptionEP17_Unwind_Exception:
  110|  3.13k|static bool isDependentException(_Unwind_Exception* unwind_exception) {
  111|  3.13k|    return (__getExceptionClass(unwind_exception) & 0xFF) == 0x01;
  112|  3.13k|}

__cxa_get_globals:
   74|  6.27k|    __cxa_eh_globals *__cxa_get_globals() {
   75|       |        // Try to get the globals for this thread
   76|  6.27k|        __cxa_eh_globals *retVal = __cxa_get_globals_fast();
   77|       |
   78|       |        // If this is the first time we've been asked for these globals, create them
   79|  6.27k|        if (NULL == retVal) {
  ------------------
  |  Branch (79:13): [True: 1, False: 6.26k]
  ------------------
   80|      1|            retVal = static_cast<__cxa_eh_globals*>(
   81|      1|                __calloc_with_fallback(1, sizeof(__cxa_eh_globals)));
   82|      1|            if (NULL == retVal)
  ------------------
  |  Branch (82:17): [True: 0, False: 1]
  ------------------
   83|      0|                abort_message("cannot allocate __cxa_eh_globals");
   84|      1|            if (0 != std::__libcpp_tls_set(key_, retVal))
  ------------------
  |  Branch (84:17): [True: 0, False: 1]
  ------------------
   85|      0|               abort_message("std::__libcpp_tls_set failure in __cxa_get_globals()");
   86|      1|        }
   87|  6.27k|        return retVal;
   88|  6.27k|    }
__cxa_get_globals_fast:
   94|  9.40k|    __cxa_eh_globals *__cxa_get_globals_fast() {
   95|       |        // First time through, create the key.
   96|  9.40k|        if (0 != std::__libcpp_execute_once(&flag_, construct_))
  ------------------
  |  Branch (96:13): [True: 0, False: 9.40k]
  ------------------
   97|      0|            abort_message("execute once failure in __cxa_get_globals_fast()");
   98|  9.40k|        return static_cast<__cxa_eh_globals*>(std::__libcpp_tls_get(key_));
   99|  9.40k|    }
cxa_exception_storage.cpp:_ZN10__cxxabiv112_GLOBAL__N_110construct_Ev:
   67|      1|    void construct_() {
   68|      1|        if (0 != std::__libcpp_tls_create(&key_, destruct_))
  ------------------
  |  Branch (68:13): [True: 0, False: 1]
  ------------------
   69|      0|            abort_message("cannot create thread specific key for __cxa_get_globals()");
   70|      1|    }

_ZSt14get_unexpectedv:
   27|  3.13k|{
   28|  3.13k|    return __libcpp_atomic_load(&__cxa_unexpected_handler, _AO_Acquire);
   29|  3.13k|}
_ZSt13get_terminatev:
   48|  3.13k|{
   49|  3.13k|    return __libcpp_atomic_load(&__cxa_terminate_handler, _AO_Acquire);
   50|  3.13k|}

__gxx_personality_v0:
  924|  18.8k|{
  925|  18.8k|    if (version != 1 || unwind_exception == 0 || context == 0)
  ------------------
  |  Branch (925:9): [True: 0, False: 18.8k]
  |  Branch (925:25): [True: 0, False: 18.8k]
  |  Branch (925:50): [True: 0, False: 18.8k]
  ------------------
  926|      0|        return _URC_FATAL_PHASE1_ERROR;
  927|       |
  928|  18.8k|    bool native_exception = (exceptionClass     & get_vendor_and_language) ==
  929|  18.8k|                            (kOurExceptionClass & get_vendor_and_language);
  930|  18.8k|    scan_results results;
  931|       |    // Process a catch handler for a native exception first.
  932|  18.8k|    if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME) &&
  ------------------
  |  Branch (932:9): [True: 3.13k, False: 15.7k]
  ------------------
  933|  3.13k|        native_exception) {
  ------------------
  |  Branch (933:9): [True: 3.13k, False: 0]
  ------------------
  934|       |        // Reload the results from the phase 1 cache.
  935|  3.13k|        __cxa_exception* exception_header =
  936|  3.13k|            (__cxa_exception*)(unwind_exception + 1) - 1;
  937|  3.13k|        results.ttypeIndex = exception_header->handlerSwitchValue;
  938|  3.13k|        results.actionRecord = exception_header->actionRecord;
  939|  3.13k|        results.languageSpecificData = exception_header->languageSpecificData;
  940|  3.13k|        results.landingPad =
  941|  3.13k|            reinterpret_cast<uintptr_t>(exception_header->catchTemp);
  942|  3.13k|        results.adjustedPtr = exception_header->adjustedPtr;
  943|       |
  944|       |        // Jump to the handler.
  945|  3.13k|        set_registers(unwind_exception, context, results);
  946|       |        // Cache base for calculating the address of ttype in
  947|       |        // __cxa_call_unexpected.
  948|  3.13k|        if (results.ttypeIndex < 0) {
  ------------------
  |  Branch (948:13): [True: 0, False: 3.13k]
  ------------------
  949|       |#if defined(_AIX)
  950|       |          exception_header->catchTemp = (void *)_Unwind_GetDataRelBase(context);
  951|       |#else
  952|      0|          exception_header->catchTemp = 0;
  953|      0|#endif
  954|      0|        }
  955|  3.13k|        return _URC_INSTALL_CONTEXT;
  956|  3.13k|    }
  957|       |
  958|       |    // In other cases we need to scan LSDA.
  959|  15.7k|    scan_eh_tab(results, actions, native_exception, unwind_exception, context);
  960|  15.7k|    if (results.reason == _URC_CONTINUE_UNWIND ||
  ------------------
  |  Branch (960:9): [True: 10.5k, False: 5.16k]
  ------------------
  961|  5.16k|        results.reason == _URC_FATAL_PHASE1_ERROR)
  ------------------
  |  Branch (961:9): [True: 0, False: 5.16k]
  ------------------
  962|  10.5k|        return results.reason;
  963|       |
  964|  5.16k|    if (actions & _UA_SEARCH_PHASE)
  ------------------
  |  Branch (964:9): [True: 3.13k, False: 2.03k]
  ------------------
  965|  3.13k|    {
  966|       |        // Phase 1 search:  All we're looking for in phase 1 is a handler that
  967|       |        //   halts unwinding
  968|  3.13k|        assert(results.reason == _URC_HANDLER_FOUND);
  ------------------
  |  Branch (968:9): [True: 3.13k, False: 0]
  ------------------
  969|  3.13k|        if (native_exception) {
  ------------------
  |  Branch (969:13): [True: 3.13k, False: 0]
  ------------------
  970|       |            // For a native exception, cache the LSDA result.
  971|  3.13k|            __cxa_exception* exc = (__cxa_exception*)(unwind_exception + 1) - 1;
  972|  3.13k|            exc->handlerSwitchValue = static_cast<int>(results.ttypeIndex);
  973|  3.13k|            exc->actionRecord = results.actionRecord;
  974|  3.13k|            exc->languageSpecificData = results.languageSpecificData;
  975|  3.13k|            exc->catchTemp = reinterpret_cast<void*>(results.landingPad);
  976|  3.13k|            exc->adjustedPtr = results.adjustedPtr;
  977|       |#ifdef __USING_WASM_EXCEPTIONS__
  978|       |            // Wasm only uses a single phase (_UA_SEARCH_PHASE), so save the
  979|       |            // results here.
  980|       |            set_registers(unwind_exception, context, results);
  981|       |#endif
  982|  3.13k|        }
  983|  3.13k|        return _URC_HANDLER_FOUND;
  984|  3.13k|    }
  985|       |
  986|  5.16k|    assert(actions & _UA_CLEANUP_PHASE);
  ------------------
  |  Branch (986:5): [True: 2.03k, False: 0]
  ------------------
  987|  2.03k|    assert(results.reason == _URC_HANDLER_FOUND);
  ------------------
  |  Branch (987:5): [True: 2.03k, False: 0]
  ------------------
  988|  2.03k|    set_registers(unwind_exception, context, results);
  989|       |    // Cache base for calculating the address of ttype in __cxa_call_unexpected.
  990|  2.03k|    if (results.ttypeIndex < 0) {
  ------------------
  |  Branch (990:9): [True: 0, False: 2.03k]
  ------------------
  991|      0|      __cxa_exception* exception_header =
  992|      0|            (__cxa_exception*)(unwind_exception + 1) - 1;
  993|       |#if defined(_AIX)
  994|       |      exception_header->catchTemp = (void *)_Unwind_GetDataRelBase(context);
  995|       |#else
  996|      0|      exception_header->catchTemp = 0;
  997|      0|#endif
  998|      0|    }
  999|  2.03k|    return _URC_INSTALL_CONTEXT;
 1000|  2.03k|}
cxa_personality.cpp:_ZN10__cxxabiv1L13set_registersEP17_Unwind_ExceptionP15_Unwind_ContextRKNS_12_GLOBAL__N_112scan_resultsE:
  549|  5.16k|{
  550|       |#if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__USING_WASM_EXCEPTIONS__)
  551|       |#define __builtin_eh_return_data_regno(regno) regno
  552|       |#elif defined(__ibmxl__)
  553|       |// IBM xlclang++ compiler does not support __builtin_eh_return_data_regno.
  554|       |#define __builtin_eh_return_data_regno(regno) regno + 3
  555|       |#endif
  556|  5.16k|  _Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
  557|  5.16k|                reinterpret_cast<uintptr_t>(unwind_exception));
  558|  5.16k|  _Unwind_SetGR(context, __builtin_eh_return_data_regno(1),
  559|  5.16k|                static_cast<uintptr_t>(results.ttypeIndex));
  560|  5.16k|  _Unwind_SetIP(context, results.landingPad);
  561|  5.16k|}
cxa_personality.cpp:_ZN10__cxxabiv1L11scan_eh_tabERNS_12_GLOBAL__N_112scan_resultsE14_Unwind_ActionbP17_Unwind_ExceptionP15_Unwind_Context:
  587|  15.7k|                        _Unwind_Context *context) {
  588|       |    // Initialize results to found nothing but an error
  589|  15.7k|    results.ttypeIndex = 0;
  590|  15.7k|    results.actionRecord = 0;
  591|  15.7k|    results.languageSpecificData = 0;
  592|  15.7k|    results.landingPad = 0;
  593|  15.7k|    results.adjustedPtr = 0;
  594|  15.7k|    results.reason = _URC_FATAL_PHASE1_ERROR;
  595|       |    // Check for consistent actions
  596|  15.7k|    if (actions & _UA_SEARCH_PHASE)
  ------------------
  |  Branch (596:9): [True: 8.43k, False: 7.33k]
  ------------------
  597|  8.43k|    {
  598|       |        // Do Phase 1
  599|  8.43k|        if (actions & (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME | _UA_FORCE_UNWIND))
  ------------------
  |  Branch (599:13): [True: 0, False: 8.43k]
  ------------------
  600|      0|        {
  601|       |            // None of these flags should be set during Phase 1
  602|       |            //   Client error
  603|      0|            results.reason = _URC_FATAL_PHASE1_ERROR;
  604|      0|            return;
  605|      0|        }
  606|  8.43k|    }
  607|  7.33k|    else if (actions & _UA_CLEANUP_PHASE)
  ------------------
  |  Branch (607:14): [True: 7.33k, False: 0]
  ------------------
  608|  7.33k|    {
  609|  7.33k|        if ((actions & _UA_HANDLER_FRAME) && (actions & _UA_FORCE_UNWIND))
  ------------------
  |  Branch (609:13): [True: 0, False: 7.33k]
  |  Branch (609:46): [True: 0, False: 0]
  ------------------
  610|      0|        {
  611|       |            // _UA_HANDLER_FRAME should only be set if phase 1 found a handler.
  612|       |            // If _UA_FORCE_UNWIND is set, phase 1 shouldn't have happened.
  613|       |            //    Client error
  614|      0|            results.reason = _URC_FATAL_PHASE2_ERROR;
  615|      0|            return;
  616|      0|        }
  617|  7.33k|    }
  618|      0|    else // Neither _UA_SEARCH_PHASE nor _UA_CLEANUP_PHASE is set
  619|      0|    {
  620|       |        // One of these should be set.
  621|       |        //   Client error
  622|      0|        results.reason = _URC_FATAL_PHASE1_ERROR;
  623|      0|        return;
  624|      0|    }
  625|       |    // Start scan by getting exception table address.
  626|  15.7k|    const uint8_t *lsda = (const uint8_t *)_Unwind_GetLanguageSpecificData(context);
  627|  15.7k|    if (lsda == 0)
  ------------------
  |  Branch (627:9): [True: 0, False: 15.7k]
  ------------------
  628|      0|    {
  629|       |        // There is no exception table
  630|      0|        results.reason = _URC_CONTINUE_UNWIND;
  631|      0|        return;
  632|      0|    }
  633|  15.7k|    results.languageSpecificData = lsda;
  634|       |#if defined(_AIX)
  635|       |    uintptr_t base = _Unwind_GetDataRelBase(context);
  636|       |#else
  637|  15.7k|    uintptr_t base = 0;
  638|  15.7k|#endif
  639|       |    // Get the current instruction pointer and offset it before next
  640|       |    // instruction in the current frame which threw the exception.
  641|  15.7k|    uintptr_t ip = _Unwind_GetIP(context) - 1;
  642|       |    // Get beginning current frame's code (as defined by the
  643|       |    // emitted dwarf code)
  644|  15.7k|    uintptr_t funcStart = _Unwind_GetRegionStart(context);
  645|       |#if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__USING_WASM_EXCEPTIONS__)
  646|       |    if (ip == uintptr_t(-1))
  647|       |    {
  648|       |        // no action
  649|       |        results.reason = _URC_CONTINUE_UNWIND;
  650|       |        return;
  651|       |    }
  652|       |    else if (ip == 0)
  653|       |        call_terminate(native_exception, unwind_exception);
  654|       |    // ip is 1-based index into call site table
  655|       |#else  // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
  656|  15.7k|    uintptr_t ipOffset = ip - funcStart;
  657|  15.7k|#endif // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
  658|  15.7k|    const uint8_t* classInfo = NULL;
  659|       |    // Note: See JITDwarfEmitter::EmitExceptionTable(...) for corresponding
  660|       |    //       dwarf emission
  661|       |    // Parse LSDA header.
  662|  15.7k|    uint8_t lpStartEncoding = *lsda++;
  663|  15.7k|    const uint8_t* lpStart = lpStartEncoding == DW_EH_PE_omit
  ------------------
  |  Branch (663:30): [True: 15.7k, False: 0]
  ------------------
  664|  15.7k|                                 ? (const uint8_t*)funcStart
  665|  15.7k|                                 : (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding, base);
  666|  15.7k|    uint8_t ttypeEncoding = *lsda++;
  667|  15.7k|    if (ttypeEncoding != DW_EH_PE_omit)
  ------------------
  |  Branch (667:9): [True: 3.13k, False: 12.6k]
  ------------------
  668|  3.13k|    {
  669|       |        // Calculate type info locations in emitted dwarf code which
  670|       |        // were flagged by type info arguments to llvm.eh.selector
  671|       |        // intrinsic
  672|  3.13k|        uintptr_t classInfoOffset = readULEB128(&lsda);
  673|  3.13k|        classInfo = lsda + classInfoOffset;
  674|  3.13k|    }
  675|       |    // Walk call-site table looking for range that
  676|       |    // includes current PC.
  677|  15.7k|    uint8_t callSiteEncoding = *lsda++;
  678|       |#if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__USING_WASM_EXCEPTIONS__)
  679|       |    (void)callSiteEncoding;  // When using SjLj/Wasm exceptions, callSiteEncoding is never used
  680|       |#endif
  681|  15.7k|    uint32_t callSiteTableLength = static_cast<uint32_t>(readULEB128(&lsda));
  682|  15.7k|    const uint8_t* callSiteTableStart = lsda;
  683|  15.7k|    const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength;
  684|  15.7k|    const uint8_t* actionTableStart = callSiteTableEnd;
  685|  15.7k|    const uint8_t* callSitePtr = callSiteTableStart;
  686|   114k|    while (callSitePtr < callSiteTableEnd)
  ------------------
  |  Branch (686:12): [True: 114k, False: 0]
  ------------------
  687|   114k|    {
  688|       |        // There is one entry per call site.
  689|   114k|#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__)
  690|       |        // The call sites are non-overlapping in [start, start+length)
  691|       |        // The call sites are ordered in increasing value of start
  692|   114k|        uintptr_t start = readEncodedPointer(&callSitePtr, callSiteEncoding);
  693|   114k|        uintptr_t length = readEncodedPointer(&callSitePtr, callSiteEncoding);
  694|   114k|        uintptr_t landingPad = readEncodedPointer(&callSitePtr, callSiteEncoding);
  695|   114k|        uintptr_t actionEntry = readULEB128(&callSitePtr);
  696|   114k|        if ((start <= ipOffset) && (ipOffset < (start + length)))
  ------------------
  |  Branch (696:13): [True: 114k, False: 0]
  |  Branch (696:36): [True: 15.7k, False: 98.5k]
  ------------------
  697|       |#else  // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
  698|       |        // ip is 1-based index into this table
  699|       |        uintptr_t landingPad = readULEB128(&callSitePtr);
  700|       |        uintptr_t actionEntry = readULEB128(&callSitePtr);
  701|       |        if (--ip == 0)
  702|       |#endif // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
  703|  15.7k|        {
  704|       |            // Found the call site containing ip.
  705|  15.7k|#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__)
  706|  15.7k|            if (landingPad == 0)
  ------------------
  |  Branch (706:17): [True: 8.55k, False: 7.20k]
  ------------------
  707|  8.55k|            {
  708|       |                // No handler here
  709|  8.55k|                results.reason = _URC_CONTINUE_UNWIND;
  710|  8.55k|                return;
  711|  8.55k|            }
  712|  7.20k|            landingPad = (uintptr_t)lpStart + landingPad;
  713|       |#else  // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
  714|       |            ++landingPad;
  715|       |#endif // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
  716|  7.20k|            results.landingPad = landingPad;
  717|  7.20k|            if (actionEntry == 0)
  ------------------
  |  Branch (717:17): [True: 4.06k, False: 3.13k]
  ------------------
  718|  4.06k|            {
  719|       |                // Found a cleanup
  720|  4.06k|                results.reason = actions & _UA_SEARCH_PHASE
  ------------------
  |  Branch (720:34): [True: 2.03k, False: 2.03k]
  ------------------
  721|  4.06k|                                     ? _URC_CONTINUE_UNWIND
  722|  4.06k|                                     : _URC_HANDLER_FOUND;
  723|  4.06k|                return;
  724|  4.06k|            }
  725|       |            // Convert 1-based byte offset into
  726|  3.13k|            const uint8_t* action = actionTableStart + (actionEntry - 1);
  727|  3.13k|            bool hasCleanup = false;
  728|       |            // Scan action entries until you find a matching handler, cleanup, or the end of action list
  729|  3.13k|            while (true)
  ------------------
  |  Branch (729:20): [True: 3.13k, Folded]
  ------------------
  730|  3.13k|            {
  731|  3.13k|                const uint8_t* actionRecord = action;
  732|  3.13k|                int64_t ttypeIndex = readSLEB128(&action);
  733|  3.13k|                if (ttypeIndex > 0)
  ------------------
  |  Branch (733:21): [True: 3.13k, False: 0]
  ------------------
  734|  3.13k|                {
  735|       |                    // Found a catch, does it actually catch?
  736|       |                    // First check for catch (...)
  737|  3.13k|                    const __shim_type_info* catchType =
  738|  3.13k|                        get_shim_type_info(static_cast<uint64_t>(ttypeIndex),
  739|  3.13k|                                           classInfo, ttypeEncoding,
  740|  3.13k|                                           native_exception, unwind_exception,
  741|  3.13k|                                           base);
  742|  3.13k|                    if (catchType == 0)
  ------------------
  |  Branch (742:25): [True: 0, False: 3.13k]
  ------------------
  743|      0|                    {
  744|       |                        // Found catch (...) catches everything, including
  745|       |                        // foreign exceptions. This is search phase, cleanup
  746|       |                        // phase with foreign exception, or forced unwinding.
  747|      0|                        assert(actions & (_UA_SEARCH_PHASE | _UA_HANDLER_FRAME |
  ------------------
  |  Branch (747:25): [True: 0, False: 0]
  ------------------
  748|      0|                                          _UA_FORCE_UNWIND));
  749|      0|                        results.ttypeIndex = ttypeIndex;
  750|      0|                        results.actionRecord = actionRecord;
  751|      0|                        results.adjustedPtr =
  752|      0|                            get_thrown_object_ptr(unwind_exception);
  753|      0|                        results.reason = _URC_HANDLER_FOUND;
  754|      0|                        return;
  755|      0|                    }
  756|       |                    // Else this is a catch (T) clause and will never
  757|       |                    //    catch a foreign exception
  758|  3.13k|                    else if (native_exception)
  ------------------
  |  Branch (758:30): [True: 3.13k, False: 0]
  ------------------
  759|  3.13k|                    {
  760|  3.13k|                        __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
  761|  3.13k|                        void* adjustedPtr = get_thrown_object_ptr(unwind_exception);
  762|  3.13k|                        const __shim_type_info* excpType =
  763|  3.13k|                            static_cast<const __shim_type_info*>(exception_header->exceptionType);
  764|  3.13k|                        if (adjustedPtr == 0 || excpType == 0)
  ------------------
  |  Branch (764:29): [True: 0, False: 3.13k]
  |  Branch (764:49): [True: 0, False: 3.13k]
  ------------------
  765|      0|                        {
  766|       |                            // Something very bad happened
  767|      0|                            call_terminate(native_exception, unwind_exception);
  768|      0|                        }
  769|  3.13k|                        if (catchType->can_catch(excpType, adjustedPtr))
  ------------------
  |  Branch (769:29): [True: 3.13k, False: 0]
  ------------------
  770|  3.13k|                        {
  771|       |                            // Found a matching handler. This is either search
  772|       |                            // phase or forced unwinding.
  773|  3.13k|                            assert(actions &
  ------------------
  |  Branch (773:29): [True: 3.13k, False: 0]
  ------------------
  774|  3.13k|                                   (_UA_SEARCH_PHASE | _UA_FORCE_UNWIND));
  775|  3.13k|                            results.ttypeIndex = ttypeIndex;
  776|  3.13k|                            results.actionRecord = actionRecord;
  777|  3.13k|                            results.adjustedPtr = adjustedPtr;
  778|  3.13k|                            results.reason = _URC_HANDLER_FOUND;
  779|  3.13k|                            return;
  780|  3.13k|                        }
  781|  3.13k|                    }
  782|       |                    // Scan next action ...
  783|  3.13k|                }
  784|      0|                else if (ttypeIndex < 0)
  ------------------
  |  Branch (784:26): [True: 0, False: 0]
  ------------------
  785|      0|                {
  786|       |                    // Found an exception specification.
  787|      0|                    if (actions & _UA_FORCE_UNWIND) {
  ------------------
  |  Branch (787:25): [True: 0, False: 0]
  ------------------
  788|       |                        // Skip if forced unwinding.
  789|      0|                    } else if (native_exception) {
  ------------------
  |  Branch (789:32): [True: 0, False: 0]
  ------------------
  790|       |                        // Does the exception spec catch this native exception?
  791|      0|                        __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
  792|      0|                        void* adjustedPtr = get_thrown_object_ptr(unwind_exception);
  793|      0|                        const __shim_type_info* excpType =
  794|      0|                            static_cast<const __shim_type_info*>(exception_header->exceptionType);
  795|      0|                        if (adjustedPtr == 0 || excpType == 0)
  ------------------
  |  Branch (795:29): [True: 0, False: 0]
  |  Branch (795:49): [True: 0, False: 0]
  ------------------
  796|      0|                        {
  797|       |                            // Something very bad happened
  798|      0|                            call_terminate(native_exception, unwind_exception);
  799|      0|                        }
  800|      0|                        if (exception_spec_can_catch(ttypeIndex, classInfo,
  ------------------
  |  Branch (800:29): [True: 0, False: 0]
  ------------------
  801|      0|                                                     ttypeEncoding, excpType,
  802|      0|                                                     adjustedPtr,
  803|      0|                                                     unwind_exception, base))
  804|      0|                        {
  805|       |                            // Native exception caught by exception
  806|       |                            // specification.
  807|      0|                            assert(actions & _UA_SEARCH_PHASE);
  ------------------
  |  Branch (807:29): [True: 0, False: 0]
  ------------------
  808|      0|                            results.ttypeIndex = ttypeIndex;
  809|      0|                            results.actionRecord = actionRecord;
  810|      0|                            results.adjustedPtr = adjustedPtr;
  811|      0|                            results.reason = _URC_HANDLER_FOUND;
  812|      0|                            return;
  813|      0|                        }
  814|      0|                    } else {
  815|       |                        // foreign exception caught by exception spec
  816|      0|                        results.ttypeIndex = ttypeIndex;
  817|      0|                        results.actionRecord = actionRecord;
  818|      0|                        results.adjustedPtr =
  819|      0|                            get_thrown_object_ptr(unwind_exception);
  820|      0|                        results.reason = _URC_HANDLER_FOUND;
  821|      0|                        return;
  822|      0|                    }
  823|       |                    // Scan next action ...
  824|      0|                } else {
  825|      0|                    hasCleanup = true;
  826|      0|                }
  827|      0|                const uint8_t* temp = action;
  828|      0|                int64_t actionOffset = readSLEB128(&temp);
  829|      0|                if (actionOffset == 0)
  ------------------
  |  Branch (829:21): [True: 0, False: 0]
  ------------------
  830|      0|                {
  831|       |                    // End of action list. If this is phase 2 and we have found
  832|       |                    // a cleanup (ttypeIndex=0), return _URC_HANDLER_FOUND;
  833|       |                    // otherwise return _URC_CONTINUE_UNWIND.
  834|      0|                    results.reason = hasCleanup && actions & _UA_CLEANUP_PHASE
  ------------------
  |  Branch (834:38): [True: 0, False: 0]
  |  Branch (834:52): [True: 0, False: 0]
  ------------------
  835|      0|                                         ? _URC_HANDLER_FOUND
  836|      0|                                         : _URC_CONTINUE_UNWIND;
  837|      0|                    return;
  838|      0|                }
  839|       |                // Go to next action
  840|      0|                action += actionOffset;
  841|      0|            }  // there is no break out of this loop, only return
  842|  3.13k|        }
  843|  98.5k|#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__)
  844|  98.5k|        else if (ipOffset < start)
  ------------------
  |  Branch (844:18): [True: 0, False: 98.5k]
  ------------------
  845|      0|        {
  846|       |            // There is no call site for this ip
  847|       |            // Something bad has happened.  We should never get here.
  848|       |            // Possible stack corruption.
  849|      0|            call_terminate(native_exception, unwind_exception);
  850|      0|        }
  851|   114k|#endif // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
  852|   114k|    }  // there might be some tricky cases which break out of this loop
  853|       |
  854|       |    // It is possible that no eh table entry specify how to handle
  855|       |    // this exception. By spec, terminate it immediately.
  856|      0|    call_terminate(native_exception, unwind_exception);
  857|      0|}
cxa_personality.cpp:_ZN10__cxxabiv1L11readSLEB128EPPKh:
  231|  3.13k|{
  232|  3.13k|    uintptr_t result = 0;
  233|  3.13k|    uintptr_t shift = 0;
  234|  3.13k|    unsigned char byte;
  235|  3.13k|    const uint8_t *p = *data;
  236|  3.13k|    do
  237|  3.13k|    {
  238|  3.13k|        byte = *p++;
  239|  3.13k|        result |= static_cast<uintptr_t>(byte & 0x7F) << shift;
  240|  3.13k|        shift += 7;
  241|  3.13k|    } while (byte & 0x80);
  ------------------
  |  Branch (241:14): [True: 0, False: 3.13k]
  ------------------
  242|  3.13k|    *data = p;
  243|  3.13k|    if ((byte & 0x40) && (shift < (sizeof(result) << 3)))
  ------------------
  |  Branch (243:9): [True: 0, False: 3.13k]
  |  Branch (243:26): [True: 0, False: 0]
  ------------------
  244|      0|        result |= static_cast<uintptr_t>(~0) << shift;
  245|  3.13k|    return static_cast<intptr_t>(result);
  246|  3.13k|}
cxa_personality.cpp:_ZN10__cxxabiv1L18get_shim_type_infoEmPKhhbP17_Unwind_Exceptionm:
  389|  3.13k|{
  390|  3.13k|    if (classInfo == 0)
  ------------------
  |  Branch (390:9): [True: 0, False: 3.13k]
  ------------------
  391|      0|    {
  392|       |        // this should not happen.  Indicates corrupted eh_table.
  393|      0|        call_terminate(native_exception, unwind_exception);
  394|      0|    }
  395|  3.13k|    switch (ttypeEncoding & 0x0F)
  396|  3.13k|    {
  397|      0|    case DW_EH_PE_absptr:
  ------------------
  |  Branch (397:5): [True: 0, False: 3.13k]
  ------------------
  398|      0|        ttypeIndex *= sizeof(void*);
  399|      0|        break;
  400|      0|    case DW_EH_PE_udata2:
  ------------------
  |  Branch (400:5): [True: 0, False: 3.13k]
  ------------------
  401|      0|    case DW_EH_PE_sdata2:
  ------------------
  |  Branch (401:5): [True: 0, False: 3.13k]
  ------------------
  402|      0|        ttypeIndex *= 2;
  403|      0|        break;
  404|      0|    case DW_EH_PE_udata4:
  ------------------
  |  Branch (404:5): [True: 0, False: 3.13k]
  ------------------
  405|  3.13k|    case DW_EH_PE_sdata4:
  ------------------
  |  Branch (405:5): [True: 3.13k, False: 0]
  ------------------
  406|  3.13k|        ttypeIndex *= 4;
  407|  3.13k|        break;
  408|      0|    case DW_EH_PE_udata8:
  ------------------
  |  Branch (408:5): [True: 0, False: 3.13k]
  ------------------
  409|      0|    case DW_EH_PE_sdata8:
  ------------------
  |  Branch (409:5): [True: 0, False: 3.13k]
  ------------------
  410|      0|        ttypeIndex *= 8;
  411|      0|        break;
  412|      0|    default:
  ------------------
  |  Branch (412:5): [True: 0, False: 3.13k]
  ------------------
  413|       |        // this should not happen.   Indicates corrupted eh_table.
  414|      0|        call_terminate(native_exception, unwind_exception);
  415|  3.13k|    }
  416|  3.13k|    classInfo -= ttypeIndex;
  417|  3.13k|    return (const __shim_type_info*)readEncodedPointer(&classInfo,
  418|  3.13k|                                                       ttypeEncoding, base);
  419|  3.13k|}
cxa_personality.cpp:_ZN10__cxxabiv1L21get_thrown_object_ptrEP17_Unwind_Exception:
  518|  3.13k|{
  519|       |    // Even for foreign exceptions, the exception object is *probably* at unwind_exception + 1
  520|       |    //    Regardless, this library is prohibited from touching a foreign exception
  521|  3.13k|    void* adjustedPtr = unwind_exception + 1;
  522|  3.13k|    if (__getExceptionClass(unwind_exception) == kOurDependentExceptionClass)
  ------------------
  |  Branch (522:9): [True: 0, False: 3.13k]
  ------------------
  523|      0|        adjustedPtr = ((__cxa_dependent_exception*)adjustedPtr - 1)->primaryException;
  524|  3.13k|    return adjustedPtr;
  525|  3.13k|}
cxa_personality.cpp:_ZN10__cxxabiv1L18readEncodedPointerEPPKhhm:
  258|   346k|{
  259|   346k|    uintptr_t result = 0;
  260|   346k|    if (encoding == DW_EH_PE_omit)
  ------------------
  |  Branch (260:9): [True: 0, False: 346k]
  ------------------
  261|      0|        return result;
  262|   346k|    const uint8_t* p = *data;
  263|       |    // first get value
  264|   346k|    switch (encoding & 0x0F)
  265|   346k|    {
  266|      0|    case DW_EH_PE_absptr:
  ------------------
  |  Branch (266:5): [True: 0, False: 346k]
  ------------------
  267|      0|        result = readPointerHelper<uintptr_t>(p);
  268|      0|        break;
  269|   342k|    case DW_EH_PE_uleb128:
  ------------------
  |  Branch (269:5): [True: 342k, False: 3.13k]
  ------------------
  270|   342k|        result = readULEB128(&p);
  271|   342k|        break;
  272|      0|    case DW_EH_PE_sleb128:
  ------------------
  |  Branch (272:5): [True: 0, False: 346k]
  ------------------
  273|      0|        result = static_cast<uintptr_t>(readSLEB128(&p));
  274|      0|        break;
  275|      0|    case DW_EH_PE_udata2:
  ------------------
  |  Branch (275:5): [True: 0, False: 346k]
  ------------------
  276|      0|        result = readPointerHelper<uint16_t>(p);
  277|      0|        break;
  278|      0|    case DW_EH_PE_udata4:
  ------------------
  |  Branch (278:5): [True: 0, False: 346k]
  ------------------
  279|      0|        result = readPointerHelper<uint32_t>(p);
  280|      0|        break;
  281|      0|    case DW_EH_PE_udata8:
  ------------------
  |  Branch (281:5): [True: 0, False: 346k]
  ------------------
  282|      0|        result = readPointerHelper<uint64_t>(p);
  283|      0|        break;
  284|      0|    case DW_EH_PE_sdata2:
  ------------------
  |  Branch (284:5): [True: 0, False: 346k]
  ------------------
  285|      0|        result = readPointerHelper<int16_t>(p);
  286|      0|        break;
  287|  3.13k|    case DW_EH_PE_sdata4:
  ------------------
  |  Branch (287:5): [True: 3.13k, False: 342k]
  ------------------
  288|  3.13k|        result = readPointerHelper<int32_t>(p);
  289|  3.13k|        break;
  290|      0|    case DW_EH_PE_sdata8:
  ------------------
  |  Branch (290:5): [True: 0, False: 346k]
  ------------------
  291|      0|        result = readPointerHelper<int64_t>(p);
  292|      0|        break;
  293|      0|    default:
  ------------------
  |  Branch (293:5): [True: 0, False: 346k]
  ------------------
  294|       |        // not supported
  295|      0|        abort();
  296|      0|        break;
  297|   346k|    }
  298|       |    // then add relative offset
  299|   346k|    switch (encoding & 0x70)
  300|   346k|    {
  301|   342k|    case DW_EH_PE_absptr:
  ------------------
  |  Branch (301:5): [True: 342k, False: 3.13k]
  ------------------
  302|       |        // do nothing
  303|   342k|        break;
  304|  3.13k|    case DW_EH_PE_pcrel:
  ------------------
  |  Branch (304:5): [True: 3.13k, False: 342k]
  ------------------
  305|  3.13k|        if (result)
  ------------------
  |  Branch (305:13): [True: 3.13k, False: 0]
  ------------------
  306|  3.13k|            result += (uintptr_t)(*data);
  307|  3.13k|        break;
  308|      0|    case DW_EH_PE_datarel:
  ------------------
  |  Branch (308:5): [True: 0, False: 346k]
  ------------------
  309|      0|        assert((base != 0) && "DW_EH_PE_datarel is invalid with a base of 0");
  ------------------
  |  Branch (309:9): [True: 0, False: 0]
  |  Branch (309:9): [True: 0, Folded]
  |  Branch (309:9): [True: 0, False: 0]
  ------------------
  310|      0|        if (result)
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|            result += base;
  312|      0|        break;
  313|      0|    case DW_EH_PE_textrel:
  ------------------
  |  Branch (313:5): [True: 0, False: 346k]
  ------------------
  314|      0|    case DW_EH_PE_funcrel:
  ------------------
  |  Branch (314:5): [True: 0, False: 346k]
  ------------------
  315|      0|    case DW_EH_PE_aligned:
  ------------------
  |  Branch (315:5): [True: 0, False: 346k]
  ------------------
  316|      0|    default:
  ------------------
  |  Branch (316:5): [True: 0, False: 346k]
  ------------------
  317|       |        // not supported
  318|      0|        abort();
  319|      0|        break;
  320|   346k|    }
  321|       |    // then apply indirection
  322|   346k|    if (result && (encoding & DW_EH_PE_indirect))
  ------------------
  |  Branch (322:9): [True: 311k, False: 34.5k]
  |  Branch (322:19): [True: 3.13k, False: 308k]
  ------------------
  323|  3.13k|        result = *((uintptr_t*)result);
  324|   346k|    *data = p;
  325|   346k|    return result;
  326|   346k|}
cxa_personality.cpp:_ZN10__cxxabiv112_GLOBAL__N_117readPointerHelperIiEEmRPKh:
  163|  3.13k|uintptr_t readPointerHelper(const uint8_t*& p) {
  164|  3.13k|    AsType value;
  165|  3.13k|    memcpy(&value, p, sizeof(AsType));
  166|  3.13k|    p += sizeof(AsType);
  167|  3.13k|    return static_cast<uintptr_t>(value);
  168|  3.13k|}
cxa_personality.cpp:_ZN10__cxxabiv1L11readULEB128EPPKh:
  208|   476k|{
  209|   476k|    uintptr_t result = 0;
  210|   476k|    uintptr_t shift = 0;
  211|   476k|    unsigned char byte;
  212|   476k|    const uint8_t *p = *data;
  213|   476k|    do
  214|   687k|    {
  215|   687k|        byte = *p++;
  216|   687k|        result |= static_cast<uintptr_t>(byte & 0x7F) << shift;
  217|   687k|        shift += 7;
  218|   687k|    } while (byte & 0x80);
  ------------------
  |  Branch (218:14): [True: 211k, False: 476k]
  ------------------
  219|   476k|    *data = p;
  220|   476k|    return result;
  221|   476k|}

_ZN10__cxxabiv130__aligned_malloc_with_fallbackEm:
  258|  3.13k|void* __aligned_malloc_with_fallback(size_t size) {
  259|       |#if defined(_WIN32)
  260|       |  if (void* dest = std::__libcpp_aligned_alloc(alignof(__aligned_type), size))
  261|       |    return dest;
  262|       |#elif defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
  263|       |  if (void* dest = ::malloc(size))
  264|       |    return dest;
  265|       |#else
  266|  3.13k|  if (size == 0)
  ------------------
  |  Branch (266:7): [True: 0, False: 3.13k]
  ------------------
  267|      0|    size = 1;
  268|  3.13k|  if (void* dest = std::__libcpp_aligned_alloc(__alignof(__aligned_type), size))
  ------------------
  |  Branch (268:13): [True: 3.13k, False: 0]
  ------------------
  269|  3.13k|    return dest;
  270|      0|#endif
  271|      0|  return fallback_malloc(size);
  272|  3.13k|}
_ZN10__cxxabiv122__calloc_with_fallbackEmm:
  274|      1|void* __calloc_with_fallback(size_t count, size_t size) {
  275|      1|  void* ptr = ::calloc(count, size);
  276|      1|  if (NULL != ptr)
  ------------------
  |  Branch (276:7): [True: 1, False: 0]
  ------------------
  277|      1|    return ptr;
  278|       |  // if calloc fails, fall back to emergency stash
  279|      0|  ptr = fallback_malloc(size * count);
  280|      0|  if (NULL != ptr)
  ------------------
  |  Branch (280:7): [True: 0, False: 0]
  ------------------
  281|      0|    ::memset(ptr, 0, size * count);
  282|      0|  return ptr;
  283|      1|}
_ZN10__cxxabiv128__aligned_free_with_fallbackEPv:
  285|  3.13k|void __aligned_free_with_fallback(void* ptr) {
  286|  3.13k|  if (is_fallback_ptr(ptr))
  ------------------
  |  Branch (286:7): [True: 0, False: 3.13k]
  ------------------
  287|      0|    fallback_free(ptr);
  288|  3.13k|  else {
  289|       |#if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
  290|       |    ::free(ptr);
  291|       |#else
  292|  3.13k|    std::__libcpp_aligned_free(ptr);
  293|  3.13k|#endif
  294|  3.13k|  }
  295|  3.13k|}
fallback_malloc.cpp:_ZN12_GLOBAL__N_115is_fallback_ptrEPv:
  128|  3.13k|bool is_fallback_ptr(void* ptr) {
  129|  3.13k|  return ptr >= heap && ptr < (heap + HEAP_SIZE);
  ------------------
  |  Branch (129:10): [True: 3.13k, False: 0]
  |  Branch (129:25): [True: 0, False: 3.13k]
  ------------------
  130|  3.13k|}

_ZNK10__cxxabiv117__class_type_info9can_catchEPKNS_16__shim_type_infoERPv:
  464|  3.13k|{
  465|       |    // bullet 1
  466|  3.13k|    if (is_equal(this, thrown_type, false))
  ------------------
  |  Branch (466:9): [True: 52, False: 3.08k]
  ------------------
  467|     52|        return true;
  468|  3.08k|    const __class_type_info* thrown_class_type =
  469|  3.08k|        dynamic_cast<const __class_type_info*>(thrown_type);
  470|  3.08k|    if (thrown_class_type == 0)
  ------------------
  |  Branch (470:9): [True: 0, False: 3.08k]
  ------------------
  471|      0|        return false;
  472|       |    // bullet 2
  473|  3.08k|    assert(adjustedPtr && "catching a class without an object?");
  ------------------
  |  Branch (473:5): [True: 3.08k, False: 0]
  |  Branch (473:5): [True: 3.08k, Folded]
  |  Branch (473:5): [True: 3.08k, False: 0]
  ------------------
  474|  3.08k|    __dynamic_cast_info info = {thrown_class_type, 0, this, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true, nullptr};
  475|  3.08k|    info.number_of_dst_type = 1;
  476|  3.08k|    thrown_class_type->has_unambiguous_public_base(&info, adjustedPtr, public_path);
  477|  3.08k|    if (info.path_dst_ptr_to_static_ptr == public_path)
  ------------------
  |  Branch (477:9): [True: 3.08k, False: 0]
  ------------------
  478|  3.08k|    {
  479|  3.08k|        adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
  480|  3.08k|        return true;
  481|  3.08k|    }
  482|      0|    return false;
  483|  3.08k|}
_ZNK10__cxxabiv117__class_type_info24process_found_base_classEPNS_19__dynamic_cast_infoEPvi:
  509|  3.08k|{
  510|  3.08k|  if (info->number_to_static_ptr == 0) {
  ------------------
  |  Branch (510:7): [True: 3.08k, False: 0]
  ------------------
  511|       |    // First time we found this base
  512|  3.08k|    info->dst_ptr_leading_to_static_ptr = adjustedPtr;
  513|  3.08k|    info->path_dst_ptr_to_static_ptr = path_below;
  514|       |    // stash the virtual base cookie.
  515|  3.08k|    info->dst_ptr_not_leading_to_static_ptr = info->vbase_cookie;
  516|  3.08k|    info->number_to_static_ptr = 1;
  517|  3.08k|  } else if (info->dst_ptr_not_leading_to_static_ptr == info->vbase_cookie &&
  ------------------
  |  Branch (517:14): [True: 0, False: 0]
  ------------------
  518|      0|             info->dst_ptr_leading_to_static_ptr == adjustedPtr) {
  ------------------
  |  Branch (518:14): [True: 0, False: 0]
  ------------------
  519|       |    // We've been here before.  Update path to "most public"
  520|      0|    if (info->path_dst_ptr_to_static_ptr == not_public_path)
  ------------------
  |  Branch (520:9): [True: 0, False: 0]
  ------------------
  521|      0|      info->path_dst_ptr_to_static_ptr = path_below;
  522|      0|  } else {
  523|       |    // We've detected an ambiguous cast from (thrown_class_type, adjustedPtr)
  524|       |    // to a static_type.
  525|      0|    info->number_to_static_ptr += 1;
  526|      0|    info->path_dst_ptr_to_static_ptr = not_public_path;
  527|      0|    info->search_done = true;
  528|      0|  }
  529|  3.08k|}
_ZNK10__cxxabiv120__si_class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi:
  544|  6.16k|{
  545|  6.16k|    if (is_equal(this, info->static_type, false))
  ------------------
  |  Branch (545:9): [True: 3.08k, False: 3.08k]
  ------------------
  546|  3.08k|        process_found_base_class(info, adjustedPtr, path_below);
  547|  3.08k|    else
  548|  3.08k|        __base_type->has_unambiguous_public_base(info, adjustedPtr, path_below);
  549|  6.16k|}
__dynamic_cast:
  899|  3.08k|               std::ptrdiff_t src2dst_offset) {
  900|       |    // Get (dynamic_ptr, dynamic_type) from static_ptr
  901|  3.08k|    derived_object_info derived_info;
  902|  3.08k|    dyn_cast_get_derived_info(&derived_info, static_ptr);
  903|       |
  904|       |    // Initialize answer to nullptr.  This will be changed from the search
  905|       |    //    results if a non-null answer is found.  Regardless, this is what will
  906|       |    //    be returned.
  907|  3.08k|    const void* dst_ptr = 0;
  908|       |
  909|       |    // Find out if we can use a giant short cut in the search
  910|  3.08k|    if (is_equal(derived_info.dynamic_type, dst_type, false))
  ------------------
  |  Branch (910:9): [True: 0, False: 3.08k]
  ------------------
  911|      0|    {
  912|      0|        dst_ptr = dyn_cast_to_derived(static_ptr,
  913|      0|                                      derived_info.dynamic_ptr,
  914|      0|                                      static_type,
  915|      0|                                      dst_type,
  916|      0|                                      derived_info.offset_to_derived,
  917|      0|                                      src2dst_offset);
  918|      0|    }
  919|  3.08k|    else
  920|  3.08k|    {
  921|       |        // Optimize toward downcasting: let's first try to do a downcast before
  922|       |        //   falling back to the slow path.
  923|  3.08k|        dst_ptr = dyn_cast_try_downcast(static_ptr,
  924|  3.08k|                                        derived_info.dynamic_ptr,
  925|  3.08k|                                        dst_type,
  926|  3.08k|                                        derived_info.dynamic_type,
  927|  3.08k|                                        src2dst_offset);
  928|       |
  929|  3.08k|        if (!dst_ptr)
  ------------------
  |  Branch (929:13): [True: 0, False: 3.08k]
  ------------------
  930|      0|        {
  931|      0|            dst_ptr = dyn_cast_slow(static_ptr,
  932|      0|                                    derived_info.dynamic_ptr,
  933|      0|                                    static_type,
  934|      0|                                    dst_type,
  935|      0|                                    derived_info.dynamic_type,
  936|      0|                                    src2dst_offset);
  937|      0|        }
  938|  3.08k|    }
  939|       |
  940|  3.08k|    return const_cast<void*>(dst_ptr);
  941|  3.08k|}
_ZNK10__cxxabiv117__class_type_info29process_static_type_above_dstEPNS_19__dynamic_cast_infoEPKvS4_i:
  961|  3.08k|{
  962|       |    // Record that we found a static_type
  963|  3.08k|    info->found_any_static_type = true;
  964|  3.08k|    if (current_ptr == info->static_ptr)
  ------------------
  |  Branch (964:9): [True: 3.08k, False: 0]
  ------------------
  965|  3.08k|    {
  966|       |        // Record that we found (static_ptr, static_type)
  967|  3.08k|        info->found_our_static_ptr = true;
  968|  3.08k|        if (info->dst_ptr_leading_to_static_ptr == 0)
  ------------------
  |  Branch (968:13): [True: 3.08k, False: 0]
  ------------------
  969|  3.08k|        {
  970|       |            // First time here
  971|  3.08k|            info->dst_ptr_leading_to_static_ptr = dst_ptr;
  972|  3.08k|            info->path_dst_ptr_to_static_ptr = path_below;
  973|  3.08k|            info->number_to_static_ptr = 1;
  974|       |            // If there is only one dst_type in the entire tree and the path from
  975|       |            //    there to here is public then we are done!
  976|  3.08k|            if (info->number_of_dst_type == 1 && info->path_dst_ptr_to_static_ptr == public_path)
  ------------------
  |  Branch (976:17): [True: 3.08k, False: 0]
  |  Branch (976:50): [True: 3.08k, False: 0]
  ------------------
  977|  3.08k|                info->search_done = true;
  978|  3.08k|        }
  979|      0|        else if (info->dst_ptr_leading_to_static_ptr == dst_ptr)
  ------------------
  |  Branch (979:18): [True: 0, False: 0]
  ------------------
  980|      0|        {
  981|       |            // We've been here before.  Update path to "most public"
  982|      0|            if (info->path_dst_ptr_to_static_ptr == not_public_path)
  ------------------
  |  Branch (982:17): [True: 0, False: 0]
  ------------------
  983|      0|                info->path_dst_ptr_to_static_ptr = path_below;
  984|       |            // If there is only one dst_type in the entire tree and the path from
  985|       |            //    there to here is public then we are done!
  986|      0|            if (info->number_of_dst_type == 1 && info->path_dst_ptr_to_static_ptr == public_path)
  ------------------
  |  Branch (986:17): [True: 0, False: 0]
  |  Branch (986:50): [True: 0, False: 0]
  ------------------
  987|      0|                info->search_done = true;
  988|      0|        }
  989|      0|        else
  990|      0|        {
  991|       |            // We've detected an ambiguous cast from (static_ptr, static_type)
  992|       |            //   to a dst_type
  993|      0|            info->number_to_static_ptr += 1;
  994|      0|            info->search_done = true;
  995|      0|        }
  996|  3.08k|    }
  997|  3.08k|}
_ZNK10__cxxabiv120__si_class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib:
 1469|  6.16k|{
 1470|  6.16k|    if (is_equal(this, info->static_type, use_strcmp))
  ------------------
  |  Branch (1470:9): [True: 3.08k, False: 3.08k]
  ------------------
 1471|  3.08k|        process_static_type_above_dst(info, dst_ptr, current_ptr, path_below);
 1472|  3.08k|    else
 1473|  3.08k|        __base_type->search_above_dst(info, dst_ptr, current_ptr, path_below, use_strcmp);
 1474|  6.16k|}
private_typeinfo.cpp:_ZL8is_equalPKSt9type_infoS1_b:
   57|  18.5k|{
   58|       |    // Use std::type_info's default comparison unless we've explicitly asked
   59|       |    // for strcmp.
   60|  18.5k|    if (!use_strcmp)
  ------------------
  |  Branch (60:9): [True: 18.5k, False: 0]
  ------------------
   61|  18.5k|        return *x == *y;
   62|       |    // Still allow pointer equality to short circut.
   63|      0|    return x == y || strcmp(x->name(), y->name()) == 0;
  ------------------
  |  Branch (63:12): [True: 0, False: 0]
  |  Branch (63:22): [True: 0, False: 0]
  ------------------
   64|  18.5k|}
private_typeinfo.cpp:_ZN10__cxxabiv112_GLOBAL__N_125dyn_cast_get_derived_infoEPNS0_19derived_object_infoEPKv:
   89|  3.08k|{
   90|       |#if __has_feature(cxx_abi_relative_vtable)
   91|       |    // The vtable address will point to the first virtual function, which is 8
   92|       |    // bytes after the start of the vtable (4 for the offset from top + 4 for
   93|       |    // the typeinfo component).
   94|       |    const int32_t* vtable =
   95|       |        *reinterpret_cast<const int32_t* const*>(static_ptr);
   96|       |    info->offset_to_derived = static_cast<std::ptrdiff_t>(vtable[-2]);
   97|       |    info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived;
   98|       |
   99|       |    // The typeinfo component is now a relative offset to a proxy.
  100|       |    int32_t offset_to_ti_proxy = vtable[-1];
  101|       |    const uint8_t* ptr_to_ti_proxy =
  102|       |        reinterpret_cast<const uint8_t*>(vtable) + offset_to_ti_proxy;
  103|       |    info->dynamic_type = *(reinterpret_cast<const __class_type_info* const*>(ptr_to_ti_proxy));
  104|       |#else
  105|  3.08k|    void **vtable = *static_cast<void ** const *>(static_ptr);
  106|  3.08k|    info->offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]);
  107|  3.08k|    info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived;
  108|  3.08k|    info->dynamic_type = static_cast<const __class_type_info*>(vtable[-1]);
  109|  3.08k|#endif
  110|  3.08k|}
private_typeinfo.cpp:_ZN10__cxxabiv112_GLOBAL__N_121dyn_cast_try_downcastEPKvS2_PKNS_17__class_type_infoES5_l:
  205|  3.08k|{
  206|  3.08k|    if (src2dst_offset < 0)
  ------------------
  |  Branch (206:9): [True: 0, False: 3.08k]
  ------------------
  207|      0|    {
  208|       |        // We can only optimize the case if the static type is a unique public
  209|       |        //   base of dst_type. Give up.
  210|      0|        return nullptr;
  211|      0|    }
  212|       |
  213|       |    // Pretend there is a dst_type object that leads to static_ptr. Later we
  214|       |    //   will check whether this imagined dst_type object exists. If it exists
  215|       |    //   then it will be the casting result.
  216|  3.08k|    const void* dst_ptr_to_static = reinterpret_cast<const char*>(static_ptr) - src2dst_offset;
  217|       |
  218|  3.08k|    if (reinterpret_cast<std::intptr_t>(dst_ptr_to_static) < reinterpret_cast<std::intptr_t>(dynamic_ptr))
  ------------------
  |  Branch (218:9): [True: 0, False: 3.08k]
  ------------------
  219|      0|    {
  220|       |        // The imagined dst_type object does not exist. Bail-out quickly.
  221|      0|        return nullptr;
  222|      0|    }
  223|       |
  224|       |    // Try to search a path from dynamic_type to dst_type.
  225|  3.08k|    __dynamic_cast_info dynamic_to_dst_info = {dynamic_type,
  226|  3.08k|                                               dst_ptr_to_static,
  227|  3.08k|                                               dst_type,
  228|  3.08k|                                               src2dst_offset,
  229|  3.08k|                                               0,
  230|  3.08k|                                               0,
  231|  3.08k|                                               0,
  232|  3.08k|                                               0,
  233|  3.08k|                                               0,
  234|  3.08k|                                               0,
  235|  3.08k|                                               0,
  236|  3.08k|                                               0,
  237|  3.08k|                                               1, // number_of_dst_type
  238|  3.08k|                                               false,
  239|  3.08k|                                               false,
  240|  3.08k|                                               false,
  241|  3.08k|                                               true,
  242|  3.08k|                                               nullptr};
  243|  3.08k|    dynamic_type->search_above_dst(&dynamic_to_dst_info, dynamic_ptr, dynamic_ptr, public_path, false);
  244|  3.08k|    if (dynamic_to_dst_info.path_dst_ptr_to_static_ptr != unknown) {
  ------------------
  |  Branch (244:9): [True: 3.08k, False: 0]
  ------------------
  245|       |        // We have found at least one path from dynamic_ptr to dst_ptr. The
  246|       |        //   downcast can succeed.
  247|  3.08k|        return dst_ptr_to_static;
  248|  3.08k|    }
  249|       |
  250|      0|    return nullptr;
  251|  3.08k|}

_ZNSt9exceptionD2Ev:
   18|  3.13k|{
   19|  3.13k|}

_Znwm:
   66|  43.6k|_LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC {
   67|  43.6k|  void* p = operator_new_impl(size);
   68|  43.6k|  if (p == nullptr)
  ------------------
  |  Branch (68:7): [True: 0, False: 43.6k]
  ------------------
   69|      0|    __throw_bad_alloc_shim();
   70|  43.6k|  return p;
   71|  43.6k|}
_ZdlPv:
  125|  43.6k|_LIBCPP_WEAK void operator delete(void* ptr) noexcept { std::free(ptr); }
_ZdlPvm:
  129|  40.5k|_LIBCPP_WEAK void operator delete(void* ptr, size_t) noexcept { ::operator delete(ptr); }
_ZnwmSt11align_val_t:
  160|  2.87k|operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC {
  161|  2.87k|  void* p = operator_new_aligned_impl(size, alignment);
  162|  2.87k|  if (p == nullptr)
  ------------------
  |  Branch (162:7): [True: 0, False: 2.87k]
  ------------------
  163|      0|    __throw_bad_alloc_shim();
  164|  2.87k|  return p;
  165|  2.87k|}
_ZdlPvSt11align_val_t:
  221|  2.87k|_LIBCPP_WEAK void operator delete(void* ptr, std::align_val_t) noexcept { std::__libcpp_aligned_free(ptr); }
stdlib_new_delete.cpp:_ZL17operator_new_implm:
   50|  43.6k|static void* operator_new_impl(std::size_t size) {
   51|  43.6k|  if (size == 0)
  ------------------
  |  Branch (51:7): [True: 0, False: 43.6k]
  ------------------
   52|      0|    size = 1;
   53|  43.6k|  void* p;
   54|  43.6k|  while ((p = std::malloc(size)) == nullptr) {
  ------------------
  |  Branch (54:10): [True: 0, False: 43.6k]
  ------------------
   55|       |    // If malloc fails and there is a new_handler,
   56|       |    // call it to try free up memory.
   57|      0|    std::new_handler nh = std::get_new_handler();
   58|      0|    if (nh)
  ------------------
  |  Branch (58:9): [True: 0, False: 0]
  ------------------
   59|      0|      nh();
   60|      0|    else
   61|      0|      break;
   62|      0|  }
   63|  43.6k|  return p;
   64|  43.6k|}
stdlib_new_delete.cpp:_ZL25operator_new_aligned_implmSt11align_val_t:
  139|  2.87k|static void* operator_new_aligned_impl(std::size_t size, std::align_val_t alignment) {
  140|  2.87k|  if (size == 0)
  ------------------
  |  Branch (140:7): [True: 0, False: 2.87k]
  ------------------
  141|      0|    size = 1;
  142|  2.87k|  if (static_cast<size_t>(alignment) < sizeof(void*))
  ------------------
  |  Branch (142:7): [True: 0, False: 2.87k]
  ------------------
  143|      0|    alignment = std::align_val_t(sizeof(void*));
  144|       |
  145|       |  // Try allocating memory. If allocation fails and there is a new_handler,
  146|       |  // call it to try free up memory, and try again until it succeeds, or until
  147|       |  // the new_handler decides to terminate.
  148|  2.87k|  void* p;
  149|  2.87k|  while ((p = std::__libcpp_aligned_alloc(static_cast<std::size_t>(alignment), size)) == nullptr) {
  ------------------
  |  Branch (149:10): [True: 0, False: 2.87k]
  ------------------
  150|      0|    std::new_handler nh = std::get_new_handler();
  151|      0|    if (nh)
  ------------------
  |  Branch (151:9): [True: 0, False: 0]
  ------------------
  152|      0|      nh();
  153|      0|    else
  154|      0|      break;
  155|      0|  }
  156|  2.87k|  return p;
  157|  2.87k|}

_ZNSt13runtime_errorD2Ev:
   30|  3.13k|runtime_error::~runtime_error() noexcept {}

_ZN11kmp_convertImiLb0ELb0ELb0ELb1EE2toEm:
 4667|     68|  static TargetType to(SourceType src) {
 4668|     68|    KMP_ASSERT(src <= static_cast<SourceType>(
  ------------------
  |  |   50|     68|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 68]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 4669|     68|                          (std::numeric_limits<TargetType>::max)()));
 4670|     68|    return (TargetType)src;
 4671|     68|  }
kmp_runtime.cpp:_ZL22__kmp_gtid_from_threadPK8kmp_info:
 3495|      1|static inline int __kmp_gtid_from_thread(const kmp_info_t *thr) {
 3496|      1|  KMP_DEBUG_ASSERT(thr);
 3497|      1|  return thr->th.th_info.ds.ds_gtid;
 3498|      1|}
kmp_runtime.cpp:_ZL13KMP_UBER_GTIDi:
 3478|      3|static inline bool KMP_UBER_GTID(int gtid) {
 3479|      3|  KMP_DEBUG_ASSERT(gtid >= KMP_GTID_MIN);
 3480|      3|  KMP_DEBUG_ASSERT(gtid < __kmp_threads_capacity);
 3481|      3|  return (gtid >= 0 && __kmp_root[gtid] && __kmp_threads[gtid] &&
  ------------------
  |  Branch (3481:11): [True: 3, False: 0]
  |  Branch (3481:24): [True: 3, False: 0]
  |  Branch (3481:44): [True: 3, False: 0]
  ------------------
 3482|      3|          __kmp_threads[gtid] == __kmp_root[gtid]->r.r_uber_thread);
  ------------------
  |  Branch (3482:11): [True: 3, False: 0]
  ------------------
 3483|      3|}
kmp_runtime.cpp:_ZL9copy_icvsP20kmp_internal_controlS0_:
 2111|      3|                             kmp_internal_control_t *src) {
 2112|      3|  *dst = *src;
 2113|      3|}
kmp_runtime.cpp:_ZL15__kmp_x86_cpuidiiP9kmp_cpuid:
 1352|      2|static inline void __kmp_x86_cpuid(int leaf, int subleaf, struct kmp_cpuid *p) {
 1353|      2|  __asm__ __volatile__("cpuid"
 1354|      2|                       : "=a"(p->eax), "=b"(p->ebx), "=c"(p->ecx), "=d"(p->edx)
 1355|      2|                       : "a"(leaf), "c"(subleaf));
 1356|      2|}
kmp_runtime.cpp:_ZL19__kmp_is_hybrid_cpuv:
 3226|      1|static inline bool __kmp_is_hybrid_cpu() { return __kmp_cpuinfo.flags.hybrid; }
_ZN11kmp_convertIliLb0ELb0ELb1ELb1EE2toEl:
 4612|      2|  static TargetType to(SourceType src) {
 4613|      2|    KMP_ASSERT(src <= static_cast<SourceType>(
  ------------------
  |  |   50|      2|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 2]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 4614|      2|                          (std::numeric_limits<TargetType>::max)()));
 4615|      2|    KMP_ASSERT(src >= static_cast<SourceType>(
  ------------------
  |  |   50|      2|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 2]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 4616|      2|                          (std::numeric_limits<TargetType>::min)()));
 4617|      2|    return (TargetType)src;
 4618|      2|  }
kmp_str.cpp:_ZL18__kmp_type_convertImiEvT_PT0_:
 4696|     68|static inline void __kmp_type_convert(T1 src, T2 *dest) {
 4697|     68|  *dest = kmp_convert<T1, T2>::to(src);
 4698|     68|}
kmp_utility.cpp:_ZL15__kmp_x86_cpuidiiP9kmp_cpuid:
 1352|      6|static inline void __kmp_x86_cpuid(int leaf, int subleaf, struct kmp_cpuid *p) {
 1353|      6|  __asm__ __volatile__("cpuid"
 1354|      6|                       : "=a"(p->eax), "=b"(p->ebx), "=c"(p->ecx), "=d"(p->edx)
 1355|      6|                       : "a"(leaf), "c"(subleaf));
 1356|      6|}
_ZN11KMPAffinityD2Ev:
  769|      1|  virtual ~KMPAffinity() = default;
kmp_lock.cpp:_ZL15__kmp_x86_pausev:
 1496|  12.3k|static inline void __kmp_x86_pause(void) { _mm_pause(); }
z_Linux_util.cpp:_ZL13KMP_UBER_GTIDi:
 3478|      2|static inline bool KMP_UBER_GTID(int gtid) {
 3479|      2|  KMP_DEBUG_ASSERT(gtid >= KMP_GTID_MIN);
 3480|      2|  KMP_DEBUG_ASSERT(gtid < __kmp_threads_capacity);
 3481|      2|  return (gtid >= 0 && __kmp_root[gtid] && __kmp_threads[gtid] &&
  ------------------
  |  Branch (3481:11): [True: 2, False: 0]
  |  Branch (3481:24): [True: 2, False: 0]
  |  Branch (3481:44): [True: 2, False: 0]
  ------------------
 3482|      2|          __kmp_threads[gtid] == __kmp_root[gtid]->r.r_uber_thread);
  ------------------
  |  Branch (3482:11): [True: 2, False: 0]
  ------------------
 3483|      2|}
z_Linux_util.cpp:_ZL18__kmp_type_convertIliEvT_PT0_:
 4696|      2|static inline void __kmp_type_convert(T1 src, T2 *dest) {
 4697|      2|  *dest = kmp_convert<T1, T2>::to(src);
 4698|      2|}
ompt-general.cpp:_ZL22__kmp_thread_from_gtidi:
 3500|      1|static inline kmp_info_t *__kmp_thread_from_gtid(int gtid) {
 3501|      1|  KMP_DEBUG_ASSERT(gtid >= 0);
 3502|      1|  return __kmp_threads[gtid];
 3503|      1|}

_ZN11KMPAffinitynwEm:
 1283|      1|void *KMPAffinity::operator new(size_t n) { return __kmp_allocate(n); }
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
_ZN11KMPAffinitydlEPv:
 1284|      1|void KMPAffinity::operator delete(void *p) { __kmp_free(p); }
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
_ZN11KMPAffinity8pick_apiEv:
 1286|      1|void KMPAffinity::pick_api() {
 1287|      1|  KMPAffinity *affinity_dispatch;
 1288|      1|  if (picked_api)
  ------------------
  |  Branch (1288:7): [True: 0, False: 1]
  ------------------
 1289|      0|    return;
 1290|       |#if KMP_USE_HWLOC
 1291|       |  // Only use Hwloc if affinity isn't explicitly disabled and
 1292|       |  // user requests Hwloc topology method
 1293|       |  if (__kmp_affinity_top_method == affinity_top_method_hwloc &&
 1294|       |      __kmp_affinity.type != affinity_disabled) {
 1295|       |    affinity_dispatch = new KMPHwlocAffinity();
 1296|       |  } else
 1297|       |#endif
 1298|      1|  {
 1299|      1|    affinity_dispatch = new KMPNativeAffinity();
 1300|      1|  }
 1301|      1|  __kmp_affinity_dispatch = affinity_dispatch;
 1302|      1|  picked_api = true;
 1303|      1|}
_ZN11KMPAffinity11destroy_apiEv:
 1305|      1|void KMPAffinity::destroy_api() {
 1306|      1|  if (__kmp_affinity_dispatch != NULL) {
  ------------------
  |  Branch (1306:7): [True: 1, False: 0]
  ------------------
 1307|      1|    delete __kmp_affinity_dispatch;
 1308|       |    __kmp_affinity_dispatch = NULL;
 1309|      1|    picked_api = false;
 1310|      1|  }
 1311|      1|}
__kmp_affinity_uninitialize:
 4627|      1|void __kmp_affinity_uninitialize(void) {
 4628|      2|  for (kmp_affinity_t *affinity : __kmp_affinities) {
  ------------------
  |  Branch (4628:33): [True: 2, False: 1]
  ------------------
 4629|      2|    if (affinity->masks != NULL)
  ------------------
  |  Branch (4629:9): [True: 0, False: 2]
  ------------------
 4630|      0|      KMP_CPU_FREE_ARRAY(affinity->masks, affinity->num_masks);
  ------------------
  |  |  707|      0|  __kmp_affinity_dispatch->deallocate_mask_array(arr)
  ------------------
 4631|      2|    if (affinity->os_id_masks != NULL)
  ------------------
  |  Branch (4631:9): [True: 0, False: 2]
  ------------------
 4632|      0|      KMP_CPU_FREE_ARRAY(affinity->os_id_masks, affinity->num_os_id_masks);
  ------------------
  |  |  707|      0|  __kmp_affinity_dispatch->deallocate_mask_array(arr)
  ------------------
 4633|      2|    if (affinity->proclist != NULL)
  ------------------
  |  Branch (4633:9): [True: 0, False: 2]
  ------------------
 4634|      0|      __kmp_free(affinity->proclist);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4635|      2|    if (affinity->ids != NULL)
  ------------------
  |  Branch (4635:9): [True: 0, False: 2]
  ------------------
 4636|      0|      __kmp_free(affinity->ids);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4637|      2|    if (affinity->attrs != NULL)
  ------------------
  |  Branch (4637:9): [True: 0, False: 2]
  ------------------
 4638|      0|      __kmp_free(affinity->attrs);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4639|      2|    *affinity = KMP_AFFINITY_INIT(affinity->env_var);
  ------------------
  |  |  911|      2|  {                                                                            \
  |  |  912|      2|    nullptr, affinity_default, KMP_HW_UNKNOWN, -1, 0, 0,                       \
  |  |  913|      2|        {TRUE, FALSE, TRUE, affinity_respect_mask_default, FALSE, FALSE}, 0,   \
  |  |  ------------------
  |  |  |  | 1280|      2|#define TRUE (!FALSE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1279|      2|#define FALSE 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       {TRUE, FALSE, TRUE, affinity_respect_mask_default, FALSE, FALSE}, 0,   \
  |  |  ------------------
  |  |  |  | 1279|      2|#define FALSE 0
  |  |  ------------------
  |  |                       {TRUE, FALSE, TRUE, affinity_respect_mask_default, FALSE, FALSE}, 0,   \
  |  |  ------------------
  |  |  |  | 1280|      2|#define TRUE (!FALSE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1279|      2|#define FALSE 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       {TRUE, FALSE, TRUE, affinity_respect_mask_default, FALSE, FALSE}, 0,   \
  |  |  ------------------
  |  |  |  |  860|      2|#define affinity_respect_mask_default (2)
  |  |  ------------------
  |  |                       {TRUE, FALSE, TRUE, affinity_respect_mask_default, FALSE, FALSE}, 0,   \
  |  |  ------------------
  |  |  |  | 1279|      2|#define FALSE 0
  |  |  ------------------
  |  |                       {TRUE, FALSE, TRUE, affinity_respect_mask_default, FALSE, FALSE}, 0,   \
  |  |  ------------------
  |  |  |  | 1279|      2|#define FALSE 0
  |  |  ------------------
  |  |  914|      2|        nullptr, nullptr, nullptr, 0, nullptr, env                             \
  |  |  915|      2|  }
  ------------------
 4640|      2|  }
 4641|      1|  if (__kmp_affin_origMask != NULL) {
  ------------------
  |  Branch (4641:7): [True: 0, False: 1]
  ------------------
 4642|      0|    if (KMP_AFFINITY_CAPABLE()) {
  ------------------
  |  |  684|      0|#define KMP_AFFINITY_CAPABLE() (__kmp_affin_mask_size > 0)
  |  |  ------------------
  |  |  |  Branch (684:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4643|      0|      __kmp_set_system_affinity(__kmp_affin_origMask, FALSE);
  ------------------
  |  |  713|      0|  (mask)->set_system_affinity(abort_bool)
  ------------------
 4644|      0|    }
 4645|      0|    KMP_CPU_FREE(__kmp_affin_origMask);
  ------------------
  |  |  698|      0|#define KMP_CPU_FREE(ptr) __kmp_affinity_dispatch->deallocate_mask(ptr)
  ------------------
 4646|      0|    __kmp_affin_origMask = NULL;
 4647|      0|  }
 4648|      1|  __kmp_affinity_num_places = 0;
 4649|      1|  if (procarr != NULL) {
  ------------------
  |  Branch (4649:7): [True: 0, False: 1]
  ------------------
 4650|      0|    __kmp_free(procarr);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4651|      0|    procarr = NULL;
 4652|      0|  }
 4653|      1|  if (__kmp_osid_to_hwthread_map) {
  ------------------
  |  Branch (4653:7): [True: 0, False: 1]
  ------------------
 4654|      0|    __kmp_free(__kmp_osid_to_hwthread_map);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4655|      0|    __kmp_osid_to_hwthread_map = NULL;
 4656|      0|  }
 4657|       |#if KMP_USE_HWLOC
 4658|       |  if (__kmp_hwloc_topology != NULL) {
 4659|       |    hwloc_topology_destroy(__kmp_hwloc_topology);
 4660|       |    __kmp_hwloc_topology = NULL;
 4661|       |  }
 4662|       |#endif
 4663|      1|  if (__kmp_hw_subset) {
  ------------------
  |  Branch (4663:7): [True: 0, False: 1]
  ------------------
 4664|      0|    kmp_hw_subset_t::deallocate(__kmp_hw_subset);
 4665|      0|    __kmp_hw_subset = nullptr;
 4666|      0|  }
 4667|      1|  if (__kmp_topology) {
  ------------------
  |  Branch (4667:7): [True: 0, False: 1]
  ------------------
 4668|      0|    kmp_topology_t::deallocate(__kmp_topology);
 4669|      0|    __kmp_topology = nullptr;
 4670|      0|  }
 4671|      1|  KMPAffinity::destroy_api();
 4672|      1|}

_ZN17KMPNativeAffinity17determine_capableEPKc:
  405|      1|  void determine_capable(const char *env_var) override {
  406|      1|    __kmp_affinity_determine_capable(env_var);
  407|      1|  }
_ZN14hierarchy_infoC2Ev:
 1098|      2|      : maxLevels(7), depth(1), uninitialized(not_initialized), resizing(0) {}

__kmp_initialize_bget:
  992|      1|void __kmp_initialize_bget(kmp_info_t *th) {
  993|      1|  KMP_DEBUG_ASSERT(SizeQuant >= sizeof(void *) && (th != 0));
  994|       |
  995|      1|  set_thr_data(th);
  996|       |
  997|      1|  bectl(th, (bget_compact_t)0, (bget_acquire_t)malloc, (bget_release_t)free,
  998|      1|        (bufsize)__kmp_malloc_pool_incr);
  999|      1|}
__kmp_finalize_bget:
 1001|      1|void __kmp_finalize_bget(kmp_info_t *th) {
 1002|      1|  thr_data_t *thr;
 1003|      1|  bfhead_t *b;
 1004|       |
 1005|      1|  KMP_DEBUG_ASSERT(th != 0);
 1006|       |
 1007|      1|#if BufStats
 1008|      1|  thr = (thr_data_t *)th->th.th_local.bget_data;
 1009|      1|  KMP_DEBUG_ASSERT(thr != NULL);
 1010|      1|  b = thr->last_pool;
 1011|       |
 1012|       |  /*  If a block-release function is defined, and this free buffer constitutes
 1013|       |      the entire block, release it. Note that pool_len is defined in such a way
 1014|       |      that the test will fail unless all pool blocks are the same size.  */
 1015|       |
 1016|       |  // Deallocate the last pool if one exists because we no longer do it in brel()
 1017|      1|  if (thr->relfcn != 0 && b != 0 && thr->numpblk != 0 &&
  ------------------
  |  Branch (1017:7): [True: 1, False: 0]
  |  Branch (1017:27): [True: 0, False: 1]
  |  Branch (1017:37): [True: 0, False: 0]
  ------------------
 1018|      0|      b->bh.bb.bsize == (bufsize)(thr->pool_len - sizeof(bhead_t))) {
  ------------------
  |  Branch (1018:7): [True: 0, False: 0]
  ------------------
 1019|      0|    KMP_DEBUG_ASSERT(b->bh.bb.prevfree == 0);
 1020|      0|    KMP_DEBUG_ASSERT(BH((char *)b + b->bh.bb.bsize)->bb.bsize == ESent);
 1021|      0|    KMP_DEBUG_ASSERT(BH((char *)b + b->bh.bb.bsize)->bb.prevfree ==
 1022|      0|                     b->bh.bb.bsize);
 1023|       |
 1024|       |    /*  Unlink the buffer from the free list  */
 1025|      0|    __kmp_bget_remove_from_freelist(b);
 1026|       |
 1027|      0|    KE_TRACE(10, ("%%%%%% FREE( %p )\n", (void *)b));
 1028|       |
 1029|      0|    (*thr->relfcn)(b);
 1030|      0|    thr->numprel++; /* Nr of expansion block releases */
 1031|      0|    thr->numpblk--; /* Total number of blocks */
 1032|      0|    KMP_DEBUG_ASSERT(thr->numpblk == thr->numpget - thr->numprel);
 1033|      0|  }
 1034|      1|#endif /* BufStats */
 1035|       |
 1036|       |  /* Deallocate bget_data */
 1037|      1|  if (th->th.th_local.bget_data != NULL) {
  ------------------
  |  Branch (1037:7): [True: 1, False: 0]
  ------------------
 1038|      1|    __kmp_free(th->th.th_local.bget_data);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 1039|       |    th->th.th_local.bget_data = NULL;
 1040|      1|  }
 1041|      1|}
__kmp_init_memkind:
 1272|      1|void __kmp_init_memkind() {
 1273|       |// as of 2018-07-31 memkind does not support Windows*, exclude it for now
 1274|       |#if KMP_OS_UNIX && KMP_DYNAMIC_LIB && !KMP_OS_DARWIN
 1275|       |  // use of statically linked memkind is problematic, as it depends on libnuma
 1276|       |  kmp_mk_lib_name = "libmemkind.so";
 1277|       |  h_memkind = dlopen(kmp_mk_lib_name, RTLD_LAZY);
 1278|       |  if (h_memkind) {
 1279|       |    kmp_mk_check = (int (*)(void *))dlsym(h_memkind, "memkind_check_available");
 1280|       |    kmp_mk_alloc =
 1281|       |        (void *(*)(void *, size_t))dlsym(h_memkind, "memkind_malloc");
 1282|       |    kmp_mk_free = (void (*)(void *, void *))dlsym(h_memkind, "memkind_free");
 1283|       |    mk_default = (void **)dlsym(h_memkind, "MEMKIND_DEFAULT");
 1284|       |    if (kmp_mk_check && kmp_mk_alloc && kmp_mk_free && mk_default &&
 1285|       |        !kmp_mk_check(*mk_default)) {
 1286|       |      __kmp_memkind_available = 1;
 1287|       |      mk_interleave = (void **)dlsym(h_memkind, "MEMKIND_INTERLEAVE");
 1288|       |      chk_kind(&mk_interleave);
 1289|       |      mk_hbw = (void **)dlsym(h_memkind, "MEMKIND_HBW");
 1290|       |      chk_kind(&mk_hbw);
 1291|       |      mk_hbw_interleave = (void **)dlsym(h_memkind, "MEMKIND_HBW_INTERLEAVE");
 1292|       |      chk_kind(&mk_hbw_interleave);
 1293|       |      mk_hbw_preferred = (void **)dlsym(h_memkind, "MEMKIND_HBW_PREFERRED");
 1294|       |      chk_kind(&mk_hbw_preferred);
 1295|       |      mk_hugetlb = (void **)dlsym(h_memkind, "MEMKIND_HUGETLB");
 1296|       |      chk_kind(&mk_hugetlb);
 1297|       |      mk_hbw_hugetlb = (void **)dlsym(h_memkind, "MEMKIND_HBW_HUGETLB");
 1298|       |      chk_kind(&mk_hbw_hugetlb);
 1299|       |      mk_hbw_preferred_hugetlb =
 1300|       |          (void **)dlsym(h_memkind, "MEMKIND_HBW_PREFERRED_HUGETLB");
 1301|       |      chk_kind(&mk_hbw_preferred_hugetlb);
 1302|       |      mk_dax_kmem = (void **)dlsym(h_memkind, "MEMKIND_DAX_KMEM");
 1303|       |      chk_kind(&mk_dax_kmem);
 1304|       |      mk_dax_kmem_all = (void **)dlsym(h_memkind, "MEMKIND_DAX_KMEM_ALL");
 1305|       |      chk_kind(&mk_dax_kmem_all);
 1306|       |      mk_dax_kmem_preferred =
 1307|       |          (void **)dlsym(h_memkind, "MEMKIND_DAX_KMEM_PREFERRED");
 1308|       |      chk_kind(&mk_dax_kmem_preferred);
 1309|       |      KE_TRACE(25, ("__kmp_init_memkind: memkind library initialized\n"));
 1310|       |      return; // success
 1311|       |    }
 1312|       |    dlclose(h_memkind); // failure
 1313|       |  }
 1314|       |#else // !(KMP_OS_UNIX && KMP_DYNAMIC_LIB)
 1315|      1|  kmp_mk_lib_name = "";
 1316|      1|#endif // !(KMP_OS_UNIX && KMP_DYNAMIC_LIB)
 1317|      1|  h_memkind = NULL;
 1318|      1|  kmp_mk_check = NULL;
 1319|      1|  kmp_mk_alloc = NULL;
 1320|      1|  kmp_mk_free = NULL;
 1321|      1|  mk_default = NULL;
 1322|      1|  mk_interleave = NULL;
 1323|      1|  mk_hbw = NULL;
 1324|      1|  mk_hbw_interleave = NULL;
 1325|      1|  mk_hbw_preferred = NULL;
 1326|      1|  mk_hugetlb = NULL;
 1327|      1|  mk_hbw_hugetlb = NULL;
 1328|      1|  mk_hbw_preferred_hugetlb = NULL;
 1329|      1|  mk_dax_kmem = NULL;
 1330|      1|  mk_dax_kmem_all = NULL;
 1331|       |  mk_dax_kmem_preferred = NULL;
 1332|      1|}
__kmp_fini_memkind:
 1334|      1|void __kmp_fini_memkind() {
 1335|       |#if KMP_OS_UNIX && KMP_DYNAMIC_LIB
 1336|       |  if (__kmp_memkind_available)
 1337|       |    KE_TRACE(25, ("__kmp_fini_memkind: finalize memkind library\n"));
 1338|       |  if (h_memkind) {
 1339|       |    dlclose(h_memkind);
 1340|       |    h_memkind = NULL;
 1341|       |  }
 1342|       |  kmp_mk_check = NULL;
 1343|       |  kmp_mk_alloc = NULL;
 1344|       |  kmp_mk_free = NULL;
 1345|       |  mk_default = NULL;
 1346|       |  mk_interleave = NULL;
 1347|       |  mk_hbw = NULL;
 1348|       |  mk_hbw_interleave = NULL;
 1349|       |  mk_hbw_preferred = NULL;
 1350|       |  mk_hugetlb = NULL;
 1351|       |  mk_hbw_hugetlb = NULL;
 1352|       |  mk_hbw_preferred_hugetlb = NULL;
 1353|       |  mk_dax_kmem = NULL;
 1354|       |  mk_dax_kmem_all = NULL;
 1355|       |  mk_dax_kmem_preferred = NULL;
 1356|       |#endif
 1357|      1|}
__kmp_init_target_mem:
 1359|      1|void __kmp_init_target_mem() {
 1360|      1|  *(void **)(&kmp_target_alloc_host) = KMP_DLSYM("llvm_omp_target_alloc_host");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1361|      1|  *(void **)(&kmp_target_alloc_shared) =
 1362|      1|      KMP_DLSYM("llvm_omp_target_alloc_shared");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1363|      1|  *(void **)(&kmp_target_alloc_device) =
 1364|      1|      KMP_DLSYM("llvm_omp_target_alloc_device");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1365|      1|  *(void **)(&kmp_target_free_host) = KMP_DLSYM("llvm_omp_target_free_host");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1366|      1|  *(void **)(&kmp_target_free_shared) =
 1367|      1|      KMP_DLSYM("llvm_omp_target_free_shared");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1368|      1|  *(void **)(&kmp_target_free_device) =
 1369|      1|      KMP_DLSYM("llvm_omp_target_free_device");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1370|      1|  __kmp_target_mem_available =
 1371|      1|      kmp_target_alloc_host && kmp_target_alloc_shared &&
  ------------------
  |  Branch (1371:7): [True: 0, False: 1]
  |  Branch (1371:32): [True: 0, False: 0]
  ------------------
 1372|      0|      kmp_target_alloc_device && kmp_target_free_host &&
  ------------------
  |  Branch (1372:7): [True: 0, False: 0]
  |  Branch (1372:34): [True: 0, False: 0]
  ------------------
 1373|      0|      kmp_target_free_shared && kmp_target_free_device;
  ------------------
  |  Branch (1373:7): [True: 0, False: 0]
  |  Branch (1373:33): [True: 0, False: 0]
  ------------------
 1374|       |  // lock/pin and unlock/unpin target calls
 1375|      1|  *(void **)(&kmp_target_lock_mem) = KMP_DLSYM("llvm_omp_target_lock_mem");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1376|       |  *(void **)(&kmp_target_unlock_mem) = KMP_DLSYM("llvm_omp_target_unlock_mem");
  ------------------
  |  | 1289|      1|#define KMP_DLSYM(name) dlsym(RTLD_DEFAULT, name)
  ------------------
 1377|      1|}
___kmp_allocate:
 1997|     29|void *___kmp_allocate(size_t size KMP_SRC_LOC_DECL) {
 1998|     29|  void *ptr;
 1999|     29|  KE_TRACE(25, ("-> __kmp_allocate( %d ) called from %s:%d\n",
 2000|     29|                (int)size KMP_SRC_LOC_PARM));
 2001|     29|  ptr = ___kmp_allocate_align(size, __kmp_align_alloc KMP_SRC_LOC_PARM);
 2002|     29|  KE_TRACE(25, ("<- __kmp_allocate() returns %p\n", ptr));
 2003|     29|  return ptr;
 2004|     29|} // func ___kmp_allocate
___kmp_free:
 2023|     27|void ___kmp_free(void *ptr KMP_SRC_LOC_DECL) {
 2024|     27|  kmp_mem_descr_t descr;
 2025|       |#if KMP_DEBUG
 2026|       |  kmp_uintptr_t addr_allocated; // Address returned by malloc().
 2027|       |  kmp_uintptr_t addr_aligned; // Aligned address passed by caller.
 2028|       |#endif
 2029|     27|  KE_TRACE(25,
 2030|     27|           ("-> __kmp_free( %p ) called from %s:%d\n", ptr KMP_SRC_LOC_PARM));
 2031|     27|  KMP_ASSERT(ptr != NULL);
  ------------------
  |  |   50|     27|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 27]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 2032|       |
 2033|     27|  descr = *(kmp_mem_descr_t *)((kmp_uintptr_t)ptr - sizeof(kmp_mem_descr_t));
 2034|       |
 2035|     27|  KE_TRACE(26, ("   __kmp_free:     "
 2036|     27|                "ptr_allocated=%p, size_allocated=%d, "
 2037|     27|                "ptr_aligned=%p, size_aligned=%d\n",
 2038|     27|                descr.ptr_allocated, (int)descr.size_allocated,
 2039|     27|                descr.ptr_aligned, (int)descr.size_aligned));
 2040|       |#if KMP_DEBUG
 2041|       |  addr_allocated = (kmp_uintptr_t)descr.ptr_allocated;
 2042|       |  addr_aligned = (kmp_uintptr_t)descr.ptr_aligned;
 2043|       |  KMP_DEBUG_ASSERT(addr_aligned % CACHE_LINE == 0);
 2044|       |  KMP_DEBUG_ASSERT(descr.ptr_aligned == ptr);
 2045|       |  KMP_DEBUG_ASSERT(addr_allocated + sizeof(kmp_mem_descr_t) <= addr_aligned);
 2046|       |  KMP_DEBUG_ASSERT(descr.size_aligned < descr.size_allocated);
 2047|       |  KMP_DEBUG_ASSERT(addr_aligned + descr.size_aligned <=
 2048|       |                   addr_allocated + descr.size_allocated);
 2049|       |  memset(descr.ptr_allocated, 0xEF, descr.size_allocated);
 2050|       |// Fill memory block with 0xEF, it helps catch using freed memory.
 2051|       |#endif
 2052|       |
 2053|     27|#ifndef LEAK_MEMORY
 2054|     27|  KE_TRACE(10, ("   free( %p )\n", descr.ptr_allocated));
 2055|       |#ifdef KMP_DEBUG
 2056|       |  _free_src_loc(descr.ptr_allocated, _file_, _line_);
 2057|       |#else
 2058|     27|  free_src_loc(descr.ptr_allocated KMP_SRC_LOC_PARM);
  ------------------
  |  |  145|     27|#define free_src_loc(args) _free_src_loc(args)
  |  |  ------------------
  |  |  |  |  190|     27|#define _free_src_loc(ptr) free((ptr))
  |  |  ------------------
  ------------------
 2059|     27|#endif
 2060|     27|#endif
 2061|     27|  KMP_MB();
 2062|     27|  KE_TRACE(25, ("<- __kmp_free() returns\n"));
 2063|     27|} // func ___kmp_free
__kmp_initialize_fast_memory:
 2276|      1|void __kmp_initialize_fast_memory(kmp_info_t *this_thr) {
 2277|      1|  KE_TRACE(10, ("__kmp_initialize_fast_memory: Called from th %p\n", this_thr));
 2278|       |
 2279|      1|  memset(this_thr->th.th_free_lists, 0, NUM_LISTS * sizeof(kmp_free_list_t));
  ------------------
  |  | 2926|      1|#define NUM_LISTS 4
  ------------------
 2280|      1|}
__kmp_free_fast_memory:
 2284|      1|void __kmp_free_fast_memory(kmp_info_t *th) {
 2285|       |  // Suppose we use BGET underlying allocator, walk through its structures...
 2286|      1|  int bin;
 2287|      1|  thr_data_t *thr = get_thr_data(th);
 2288|      1|  void **lst = NULL;
 2289|       |
 2290|      1|  KE_TRACE(
 2291|      1|      5, ("__kmp_free_fast_memory: Called T#%d\n", __kmp_gtid_from_thread(th)));
 2292|       |
 2293|      1|  __kmp_bget_dequeue(th); // Release any queued buffers
 2294|       |
 2295|       |  // Dig through free lists and extract all allocated blocks
 2296|     21|  for (bin = 0; bin < MAX_BGET_BINS; ++bin) {
  ------------------
  |  |  124|     21|#define MAX_BGET_BINS (int)(sizeof(bget_bin_size) / sizeof(bufsize))
  ------------------
  |  Branch (2296:17): [True: 20, False: 1]
  ------------------
 2297|     20|    bfhead_t *b = thr->freelist[bin].ql.flink;
 2298|     20|    while (b != &thr->freelist[bin]) {
  ------------------
  |  Branch (2298:12): [True: 0, False: 20]
  ------------------
 2299|      0|      if ((kmp_uintptr_t)b->bh.bb.bthr & 1) { // the buffer is allocated address
  ------------------
  |  Branch (2299:11): [True: 0, False: 0]
  ------------------
 2300|      0|        *((void **)b) =
 2301|      0|            lst; // link the list (override bthr, but keep flink yet)
 2302|      0|        lst = (void **)b; // push b into lst
 2303|      0|      }
 2304|      0|      b = b->ql.flink; // get next buffer
 2305|      0|    }
 2306|     20|  }
 2307|      1|  while (lst != NULL) {
  ------------------
  |  Branch (2307:10): [True: 0, False: 1]
  ------------------
 2308|      0|    void *next = *lst;
 2309|      0|    KE_TRACE(10, ("__kmp_free_fast_memory: freeing %p, next=%p th %p (%d)\n",
 2310|      0|                  lst, next, th, __kmp_gtid_from_thread(th)));
 2311|      0|    (*thr->relfcn)(lst);
 2312|      0|#if BufStats
 2313|       |    // count blocks to prevent problems in __kmp_finalize_bget()
 2314|      0|    thr->numprel++; /* Nr of expansion block releases */
 2315|      0|    thr->numpblk--; /* Total number of blocks */
 2316|      0|#endif
 2317|      0|    lst = (void **)next;
 2318|      0|  }
 2319|       |
 2320|      1|  KE_TRACE(
 2321|      1|      5, ("__kmp_free_fast_memory: Freed T#%d\n", __kmp_gtid_from_thread(th)));
 2322|      1|}
kmp_alloc.cpp:_ZL12set_thr_dataP8kmp_info:
  227|      1|static void set_thr_data(kmp_info_t *th) {
  228|      1|  int i;
  229|      1|  thr_data_t *data;
  230|       |
  231|      1|  data = (thr_data_t *)((!th->th.th_local.bget_data)
  ------------------
  |  Branch (231:25): [True: 1, False: 0]
  ------------------
  232|      1|                            ? __kmp_allocate(sizeof(*data))
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
  233|      1|                            : th->th.th_local.bget_data);
  234|       |
  235|      1|  memset(data, '\0', sizeof(*data));
  236|       |
  237|     21|  for (i = 0; i < MAX_BGET_BINS; ++i) {
  ------------------
  |  |  124|     21|#define MAX_BGET_BINS (int)(sizeof(bget_bin_size) / sizeof(bufsize))
  ------------------
  |  Branch (237:15): [True: 20, False: 1]
  ------------------
  238|     20|    data->freelist[i].ql.flink = &data->freelist[i];
  239|     20|    data->freelist[i].ql.blink = &data->freelist[i];
  240|     20|  }
  241|       |
  242|      1|  th->th.th_local.bget_data = data;
  243|      1|  th->th.th_local.bget_list = 0;
  244|       |#if !USE_CMP_XCHG_FOR_BGET
  245|       |#ifdef USE_QUEUING_LOCK_FOR_BGET
  246|       |  __kmp_init_lock(&th->th.th_local.bget_lock);
  247|       |#else
  248|       |  __kmp_init_bootstrap_lock(&th->th.th_local.bget_lock);
  249|       |#endif /* USE_LOCK_FOR_BGET */
  250|       |#endif /* ! USE_CMP_XCHG_FOR_BGET */
  251|      1|}
kmp_alloc.cpp:_ZL5bectlP8kmp_infoPFimiEPFPvmEPFvS3_El:
  867|      1|                  bufsize pool_incr) {
  868|      1|  thr_data_t *thr = get_thr_data(th);
  869|       |
  870|      1|  thr->compfcn = compact;
  871|      1|  thr->acqfcn = acquire;
  872|      1|  thr->relfcn = release;
  873|      1|  thr->exp_incr = pool_incr;
  874|      1|}
kmp_alloc.cpp:_ZL12get_thr_dataP8kmp_info:
  253|      2|static thr_data_t *get_thr_data(kmp_info_t *th) {
  254|      2|  thr_data_t *data;
  255|       |
  256|      2|  data = (thr_data_t *)th->th.th_local.bget_data;
  257|       |
  258|      2|  KMP_DEBUG_ASSERT(data != 0);
  259|       |
  260|      2|  return data;
  261|      2|}
kmp_alloc.cpp:_ZL18__kmp_bget_dequeueP8kmp_info:
  264|      1|static void __kmp_bget_dequeue(kmp_info_t *th) {
  265|      1|  void *p = TCR_SYNC_PTR(th->th.th_local.bget_list);
  ------------------
  |  | 1158|      1|#define TCR_SYNC_PTR(a) ((void *)TCR_SYNC_8(a))
  |  |  ------------------
  |  |  |  | 1140|      1|#define TCR_SYNC_8(a) (a)
  |  |  ------------------
  ------------------
  266|       |
  267|      1|  if (p != 0) {
  ------------------
  |  Branch (267:7): [True: 0, False: 1]
  ------------------
  268|      0|#if USE_CMP_XCHG_FOR_BGET
  269|      0|    {
  270|      0|      volatile void *old_value = TCR_SYNC_PTR(th->th.th_local.bget_list);
  ------------------
  |  | 1158|      0|#define TCR_SYNC_PTR(a) ((void *)TCR_SYNC_8(a))
  |  |  ------------------
  |  |  |  | 1140|      0|#define TCR_SYNC_8(a) (a)
  |  |  ------------------
  ------------------
  271|      0|      while (!KMP_COMPARE_AND_STORE_PTR(&th->th.th_local.bget_list,
  ------------------
  |  |  813|      0|  __sync_bool_compare_and_swap((void *volatile *)(p), (void *)(cv),            \
  |  |  814|      0|                               (void *)(sv))
  ------------------
  |  Branch (271:14): [True: 0, False: 0]
  ------------------
  272|      0|                                        CCAST(void *, old_value), nullptr)) {
  273|      0|        KMP_CPU_PAUSE();
  ------------------
  |  | 1498|      0|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  ------------------
  274|      0|        old_value = TCR_SYNC_PTR(th->th.th_local.bget_list);
  ------------------
  |  | 1158|      0|#define TCR_SYNC_PTR(a) ((void *)TCR_SYNC_8(a))
  |  |  ------------------
  |  |  |  | 1140|      0|#define TCR_SYNC_8(a) (a)
  |  |  ------------------
  ------------------
  275|      0|      }
  276|      0|      p = CCAST(void *, old_value);
  ------------------
  |  |  229|      0|#define CCAST(type, var) const_cast<type>(var)
  ------------------
  277|      0|    }
  278|       |#else /* ! USE_CMP_XCHG_FOR_BGET */
  279|       |#ifdef USE_QUEUING_LOCK_FOR_BGET
  280|       |    __kmp_acquire_lock(&th->th.th_local.bget_lock, __kmp_gtid_from_thread(th));
  281|       |#else
  282|       |    __kmp_acquire_bootstrap_lock(&th->th.th_local.bget_lock);
  283|       |#endif /* USE_QUEUING_LOCK_FOR_BGET */
  284|       |
  285|       |    p = (void *)th->th.th_local.bget_list;
  286|       |    th->th.th_local.bget_list = 0;
  287|       |
  288|       |#ifdef USE_QUEUING_LOCK_FOR_BGET
  289|       |    __kmp_release_lock(&th->th.th_local.bget_lock, __kmp_gtid_from_thread(th));
  290|       |#else
  291|       |    __kmp_release_bootstrap_lock(&th->th.th_local.bget_lock);
  292|       |#endif
  293|       |#endif /* USE_CMP_XCHG_FOR_BGET */
  294|       |
  295|       |    /* Check again to make sure the list is not empty */
  296|      0|    while (p != 0) {
  ------------------
  |  Branch (296:12): [True: 0, False: 0]
  ------------------
  297|      0|      void *buf = p;
  298|      0|      bfhead_t *b = BFH(((char *)p) - sizeof(bhead_t));
  ------------------
  |  |  165|      0|#define BFH(p) ((bfhead_t *)(p))
  ------------------
  299|       |
  300|      0|      KMP_DEBUG_ASSERT(b->bh.bb.bsize != 0);
  301|      0|      KMP_DEBUG_ASSERT(((kmp_uintptr_t)TCR_PTR(b->bh.bb.bthr) & ~1) ==
  302|      0|                       (kmp_uintptr_t)th); // clear possible mark
  303|      0|      KMP_DEBUG_ASSERT(b->ql.blink == 0);
  304|       |
  305|      0|      p = (void *)b->ql.flink;
  306|       |
  307|      0|      brel(th, buf);
  308|      0|    }
  309|      0|  }
  310|      1|}
kmp_alloc.cpp:_ZL21___kmp_allocate_alignmm:
 1913|     29|                                   size_t alignment KMP_SRC_LOC_DECL) {
 1914|       |  /* __kmp_allocate() allocates (by call to malloc()) bigger memory block than
 1915|       |     requested to return properly aligned pointer. Original pointer returned
 1916|       |     by malloc() and size of allocated block is saved in descriptor just
 1917|       |     before the aligned pointer. This information used by __kmp_free() -- it
 1918|       |     has to pass to free() original pointer, not aligned one.
 1919|       |
 1920|       |          +---------+------------+-----------------------------------+---------+
 1921|       |          | padding | descriptor |           aligned block           | padding |
 1922|       |          +---------+------------+-----------------------------------+---------+
 1923|       |          ^                      ^
 1924|       |          |                      |
 1925|       |          |                      +- Aligned pointer returned to caller
 1926|       |          +- Pointer returned by malloc()
 1927|       |
 1928|       |      Aligned block is filled with zeros, paddings are filled with 0xEF. */
 1929|       |
 1930|     29|  kmp_mem_descr_t descr;
 1931|     29|  kmp_uintptr_t addr_allocated; // Address returned by malloc().
 1932|     29|  kmp_uintptr_t addr_aligned; // Aligned address to return to caller.
 1933|     29|  kmp_uintptr_t addr_descr; // Address of memory block descriptor.
 1934|       |
 1935|     29|  KE_TRACE(25, ("-> ___kmp_allocate_align( %d, %d ) called from %s:%d\n",
 1936|     29|                (int)size, (int)alignment KMP_SRC_LOC_PARM));
 1937|       |
 1938|     29|  KMP_DEBUG_ASSERT(alignment < 32 * 1024); // Alignment should not be too
 1939|     29|  KMP_DEBUG_ASSERT(sizeof(void *) <= sizeof(kmp_uintptr_t));
 1940|       |  // Make sure kmp_uintptr_t is enough to store addresses.
 1941|       |
 1942|     29|  descr.size_aligned = size;
 1943|     29|  descr.size_allocated =
 1944|     29|      descr.size_aligned + sizeof(kmp_mem_descr_t) + alignment;
 1945|       |
 1946|       |#if KMP_DEBUG
 1947|       |  descr.ptr_allocated = _malloc_src_loc(descr.size_allocated, _file_, _line_);
 1948|       |#else
 1949|     29|  descr.ptr_allocated = malloc_src_loc(descr.size_allocated KMP_SRC_LOC_PARM);
  ------------------
  |  |  144|     29|#define malloc_src_loc(args) _malloc_src_loc(args)
  |  |  ------------------
  |  |  |  |  189|     29|#define _malloc_src_loc(size) malloc((size))
  |  |  ------------------
  ------------------
 1950|     29|#endif
 1951|     29|  KE_TRACE(10, ("   malloc( %d ) returned %p\n", (int)descr.size_allocated,
 1952|     29|                descr.ptr_allocated));
 1953|     29|  if (descr.ptr_allocated == NULL) {
  ------------------
  |  Branch (1953:7): [True: 0, False: 29]
  ------------------
 1954|      0|    KMP_FATAL(OutOfHeapMemory);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1955|      0|  }
 1956|       |
 1957|     29|  addr_allocated = (kmp_uintptr_t)descr.ptr_allocated;
 1958|     29|  addr_aligned =
 1959|     29|      (addr_allocated + sizeof(kmp_mem_descr_t) + alignment) & ~(alignment - 1);
 1960|     29|  addr_descr = addr_aligned - sizeof(kmp_mem_descr_t);
 1961|       |
 1962|     29|  descr.ptr_aligned = (void *)addr_aligned;
 1963|       |
 1964|     29|  KE_TRACE(26, ("   ___kmp_allocate_align: "
 1965|     29|                "ptr_allocated=%p, size_allocated=%d, "
 1966|     29|                "ptr_aligned=%p, size_aligned=%d\n",
 1967|     29|                descr.ptr_allocated, (int)descr.size_allocated,
 1968|     29|                descr.ptr_aligned, (int)descr.size_aligned));
 1969|       |
 1970|     29|  KMP_DEBUG_ASSERT(addr_allocated <= addr_descr);
 1971|     29|  KMP_DEBUG_ASSERT(addr_descr + sizeof(kmp_mem_descr_t) == addr_aligned);
 1972|     29|  KMP_DEBUG_ASSERT(addr_aligned + descr.size_aligned <=
 1973|     29|                   addr_allocated + descr.size_allocated);
 1974|     29|  KMP_DEBUG_ASSERT(addr_aligned % alignment == 0);
 1975|       |#ifdef KMP_DEBUG
 1976|       |  memset(descr.ptr_allocated, 0xEF, descr.size_allocated);
 1977|       |// Fill allocated memory block with 0xEF.
 1978|       |#endif
 1979|     29|  memset(descr.ptr_aligned, 0x00, descr.size_aligned);
 1980|       |  // Fill the aligned memory block (which is intended for using by caller) with
 1981|       |  // 0x00. Do not
 1982|       |  // put this filling under KMP_DEBUG condition! Many callers expect zeroed
 1983|       |  // memory. (Padding
 1984|       |  // bytes remain filled with 0xEF in debugging library.)
 1985|     29|  *((kmp_mem_descr_t *)addr_descr) = descr;
 1986|       |
 1987|     29|  KMP_MB();
 1988|       |
 1989|     29|  KE_TRACE(25, ("<- ___kmp_allocate_align() returns %p\n", descr.ptr_aligned));
 1990|     29|  return descr.ptr_aligned;
 1991|     29|} // func ___kmp_allocate_align

kmp_runtime.cpp:_ZL22__kmp_init_atomic_lockP16kmp_queuing_lock:
  405|     13|static inline void __kmp_init_atomic_lock(kmp_atomic_lock_t *lck) {
  406|     13|  __kmp_init_queuing_lock(lck);
  407|     13|}

__kmpc_init_lock:
 2419|  6.16k|void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
 2420|  6.16k|#if KMP_USE_DYNAMIC_LOCK
 2421|       |
 2422|  6.16k|  KMP_DEBUG_ASSERT(__kmp_init_serial);
 2423|  6.16k|  if (__kmp_env_consistency_check && user_lock == NULL) {
  ------------------
  |  Branch (2423:7): [True: 0, False: 6.16k]
  |  Branch (2423:38): [True: 0, False: 0]
  ------------------
 2424|      0|    KMP_FATAL(LockIsUninitialized, "omp_init_lock");
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
 2425|      0|  }
 2426|  6.16k|  __kmp_init_lock_with_hint(loc, user_lock, __kmp_user_lock_seq);
 2427|       |
 2428|  6.16k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 2429|       |  // This is the case, if called from omp_init_lock_with_hint:
 2430|  6.16k|  void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
  ------------------
  |  |   93|  6.16k|#define OMPT_LOAD_RETURN_ADDRESS(gtid) __ompt_load_return_address(gtid)
  ------------------
 2431|  6.16k|  if (!codeptr)
  ------------------
  |  Branch (2431:7): [True: 6.16k, False: 0]
  ------------------
 2432|  6.16k|    codeptr = OMPT_GET_RETURN_ADDRESS(0);
  ------------------
  |  |  108|  6.16k|#define OMPT_GET_RETURN_ADDRESS(level) __builtin_return_address(level)
  ------------------
 2433|  6.16k|  if (ompt_enabled.ompt_callback_lock_init) {
  ------------------
  |  Branch (2433:7): [True: 0, False: 6.16k]
  ------------------
 2434|      0|    ompt_callbacks.ompt_callback(ompt_callback_lock_init)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
 2435|      0|        ompt_mutex_lock, omp_lock_hint_none,
 2436|      0|        __ompt_get_mutex_impl_type(user_lock),
 2437|      0|        (ompt_wait_id_t)(uintptr_t)user_lock, codeptr);
 2438|      0|  }
 2439|  6.16k|#endif
 2440|       |
 2441|       |#else // KMP_USE_DYNAMIC_LOCK
 2442|       |
 2443|       |  static char const *const func = "omp_init_lock";
 2444|       |  kmp_user_lock_p lck;
 2445|       |  KMP_DEBUG_ASSERT(__kmp_init_serial);
 2446|       |
 2447|       |  if (__kmp_env_consistency_check) {
 2448|       |    if (user_lock == NULL) {
 2449|       |      KMP_FATAL(LockIsUninitialized, func);
 2450|       |    }
 2451|       |  }
 2452|       |
 2453|       |  KMP_CHECK_USER_LOCK_INIT();
 2454|       |
 2455|       |  if ((__kmp_user_lock_kind == lk_tas) &&
 2456|       |      (sizeof(lck->tas.lk.poll) <= OMP_LOCK_T_SIZE)) {
 2457|       |    lck = (kmp_user_lock_p)user_lock;
 2458|       |  }
 2459|       |#if KMP_USE_FUTEX
 2460|       |  else if ((__kmp_user_lock_kind == lk_futex) &&
 2461|       |           (sizeof(lck->futex.lk.poll) <= OMP_LOCK_T_SIZE)) {
 2462|       |    lck = (kmp_user_lock_p)user_lock;
 2463|       |  }
 2464|       |#endif
 2465|       |  else {
 2466|       |    lck = __kmp_user_lock_allocate(user_lock, gtid, 0);
 2467|       |  }
 2468|       |  INIT_LOCK(lck);
 2469|       |  __kmp_set_user_lock_location(lck, loc);
 2470|       |
 2471|       |#if OMPT_SUPPORT && OMPT_OPTIONAL
 2472|       |  // This is the case, if called from omp_init_lock_with_hint:
 2473|       |  void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
 2474|       |  if (!codeptr)
 2475|       |    codeptr = OMPT_GET_RETURN_ADDRESS(0);
 2476|       |  if (ompt_enabled.ompt_callback_lock_init) {
 2477|       |    ompt_callbacks.ompt_callback(ompt_callback_lock_init)(
 2478|       |        ompt_mutex_lock, omp_lock_hint_none, __ompt_get_mutex_impl_type(),
 2479|       |        (ompt_wait_id_t)(uintptr_t)user_lock, codeptr);
 2480|       |  }
 2481|       |#endif
 2482|       |
 2483|       |#if USE_ITT_BUILD
 2484|       |  __kmp_itt_lock_creating(lck);
 2485|       |#endif /* USE_ITT_BUILD */
 2486|       |
 2487|       |#endif // KMP_USE_DYNAMIC_LOCK
 2488|  6.16k|} // __kmpc_init_lock
__kmpc_destroy_lock:
 2565|  6.16k|void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
 2566|  6.16k|#if KMP_USE_DYNAMIC_LOCK
 2567|       |
 2568|       |#if USE_ITT_BUILD
 2569|       |  kmp_user_lock_p lck;
 2570|       |  if (KMP_EXTRACT_D_TAG(user_lock) == 0) {
 2571|       |    lck = ((kmp_indirect_lock_t *)KMP_LOOKUP_I_LOCK(user_lock))->lock;
 2572|       |  } else {
 2573|       |    lck = (kmp_user_lock_p)user_lock;
 2574|       |  }
 2575|       |  __kmp_itt_lock_destroyed(lck);
 2576|       |#endif
 2577|  6.16k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 2578|       |  // This is the case, if called from omp_init_lock_with_hint:
 2579|  6.16k|  void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
  ------------------
  |  |   93|  6.16k|#define OMPT_LOAD_RETURN_ADDRESS(gtid) __ompt_load_return_address(gtid)
  ------------------
 2580|  6.16k|  if (!codeptr)
  ------------------
  |  Branch (2580:7): [True: 6.16k, False: 0]
  ------------------
 2581|  6.16k|    codeptr = OMPT_GET_RETURN_ADDRESS(0);
  ------------------
  |  |  108|  6.16k|#define OMPT_GET_RETURN_ADDRESS(level) __builtin_return_address(level)
  ------------------
 2582|  6.16k|  if (ompt_enabled.ompt_callback_lock_destroy) {
  ------------------
  |  Branch (2582:7): [True: 0, False: 6.16k]
  ------------------
 2583|      0|    ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
 2584|      0|        ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr);
 2585|      0|  }
 2586|  6.16k|#endif
 2587|  6.16k|  KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock);
  ------------------
  |  | 1149|  6.16k|#define KMP_D_LOCK_FUNC(l, op) __kmp_direct_##op[KMP_EXTRACT_D_TAG(l)]
  |  |  ------------------
  |  |  |  | 1141|  6.16k|  (*((kmp_dyna_lock_t *)(l)) & ((1 << KMP_LOCK_SHIFT) - 1) &                   \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1076|  6.16k|  8 // number of low bits to be used as tag for direct locks
  |  |  |  |  ------------------
  |  |  |  | 1142|  6.16k|   -(*((kmp_dyna_lock_t *)(l)) & 1))
  |  |  ------------------
  ------------------
 2588|       |#else
 2589|       |  kmp_user_lock_p lck;
 2590|       |
 2591|       |  if ((__kmp_user_lock_kind == lk_tas) &&
 2592|       |      (sizeof(lck->tas.lk.poll) <= OMP_LOCK_T_SIZE)) {
 2593|       |    lck = (kmp_user_lock_p)user_lock;
 2594|       |  }
 2595|       |#if KMP_USE_FUTEX
 2596|       |  else if ((__kmp_user_lock_kind == lk_futex) &&
 2597|       |           (sizeof(lck->futex.lk.poll) <= OMP_LOCK_T_SIZE)) {
 2598|       |    lck = (kmp_user_lock_p)user_lock;
 2599|       |  }
 2600|       |#endif
 2601|       |  else {
 2602|       |    lck = __kmp_lookup_user_lock(user_lock, "omp_destroy_lock");
 2603|       |  }
 2604|       |
 2605|       |#if OMPT_SUPPORT && OMPT_OPTIONAL
 2606|       |  // This is the case, if called from omp_init_lock_with_hint:
 2607|       |  void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
 2608|       |  if (!codeptr)
 2609|       |    codeptr = OMPT_GET_RETURN_ADDRESS(0);
 2610|       |  if (ompt_enabled.ompt_callback_lock_destroy) {
 2611|       |    ompt_callbacks.ompt_callback(ompt_callback_lock_destroy)(
 2612|       |        ompt_mutex_lock, (ompt_wait_id_t)(uintptr_t)user_lock, codeptr);
 2613|       |  }
 2614|       |#endif
 2615|       |
 2616|       |#if USE_ITT_BUILD
 2617|       |  __kmp_itt_lock_destroyed(lck);
 2618|       |#endif /* USE_ITT_BUILD */
 2619|       |  DESTROY_LOCK(lck);
 2620|       |
 2621|       |  if ((__kmp_user_lock_kind == lk_tas) &&
 2622|       |      (sizeof(lck->tas.lk.poll) <= OMP_LOCK_T_SIZE)) {
 2623|       |    ;
 2624|       |  }
 2625|       |#if KMP_USE_FUTEX
 2626|       |  else if ((__kmp_user_lock_kind == lk_futex) &&
 2627|       |           (sizeof(lck->futex.lk.poll) <= OMP_LOCK_T_SIZE)) {
 2628|       |    ;
 2629|       |  }
 2630|       |#endif
 2631|       |  else {
 2632|       |    __kmp_user_lock_free(user_lock, gtid, lck);
 2633|       |  }
 2634|       |#endif // KMP_USE_DYNAMIC_LOCK
 2635|  6.16k|} // __kmpc_destroy_lock
kmp_csupport.cpp:_ZL25__kmp_init_lock_with_hintP5identPPv18kmp_dyna_lockseq_t:
 2315|  6.16k|                                                    kmp_dyna_lockseq_t seq) {
 2316|  6.16k|  if (KMP_IS_D_LOCK(seq)) {
  ------------------
  |  | 1104|  6.16k|  ((seq) >= KMP_FIRST_D_LOCK && (seq) <= KMP_LAST_D_LOCK)
  |  |  ------------------
  |  |  |  | 1077|  12.3k|#define KMP_FIRST_D_LOCK lockseq_tas
  |  |  ------------------
  |  |                 ((seq) >= KMP_FIRST_D_LOCK && (seq) <= KMP_LAST_D_LOCK)
  |  |  ------------------
  |  |  |  | 1057|  6.16k|#define KMP_LAST_D_LOCK lockseq_rtm_spin
  |  |  ------------------
  |  |  |  Branch (1104:4): [True: 6.16k, False: 0]
  |  |  |  Branch (1104:33): [True: 0, False: 6.16k]
  |  |  ------------------
  ------------------
 2317|      0|    KMP_INIT_D_LOCK(lock, seq);
  ------------------
  |  | 1158|      0|  __kmp_direct_init[KMP_GET_D_TAG(seq)]((kmp_dyna_lock_t *)l, seq)
  |  |  ------------------
  |  |  |  | 1108|      0|#define KMP_GET_D_TAG(seq) ((seq) << 1 | 1)
  |  |  ------------------
  ------------------
 2318|       |#if USE_ITT_BUILD
 2319|       |    __kmp_itt_lock_creating((kmp_user_lock_p)lock, NULL);
 2320|       |#endif
 2321|  6.16k|  } else {
 2322|  6.16k|    KMP_INIT_I_LOCK(lock, seq);
  ------------------
  |  | 1162|  6.16k|  __kmp_direct_init[0]((kmp_dyna_lock_t *)(l), seq)
  ------------------
 2323|       |#if USE_ITT_BUILD
 2324|       |    kmp_indirect_lock_t *ilk = KMP_LOOKUP_I_LOCK(lock);
 2325|       |    __kmp_itt_lock_creating(ilk->lock, loc);
 2326|       |#endif
 2327|  6.16k|  }
 2328|  6.16k|}

__kmp_env_get:
   84|      3|char *__kmp_env_get(char const *name) {
   85|       |
   86|      3|  char *result = NULL;
   87|       |
   88|      3|#if KMP_OS_UNIX
   89|      3|  char const *value = getenv(name);
   90|      3|  if (value != NULL) {
  ------------------
  |  Branch (90:7): [True: 2, False: 1]
  ------------------
   91|      2|    size_t len = KMP_STRLEN(value) + 1;
  ------------------
  |  |   68|      2|#define KMP_STRLEN strlen
  ------------------
   92|      2|    result = (char *)KMP_INTERNAL_MALLOC(len);
  ------------------
  |  |  110|      2|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
   93|      2|    if (result == NULL) {
  ------------------
  |  Branch (93:9): [True: 0, False: 2]
  ------------------
   94|      0|      KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
   95|      0|    }
   96|      2|    KMP_STRNCPY_S(result, len, value, len);
  ------------------
  |  |   64|      2|#define KMP_STRNCPY_S(dst, bsz, src, cnt) strncpy(dst, src, cnt)
  ------------------
   97|      2|  }
   98|       |#elif KMP_OS_WINDOWS
   99|       |  /* We use GetEnvironmentVariable for Windows* OS instead of getenv because the
  100|       |     act of loading a DLL on Windows* OS makes any user-set environment
  101|       |     variables (i.e. with putenv()) unavailable. getenv() apparently gets a
  102|       |     clean copy of the env variables as they existed at the start of the run.
  103|       |     JH 12/23/2002 */
  104|       |  DWORD rc;
  105|       |  rc = GetEnvironmentVariable(name, NULL, 0);
  106|       |  if (!rc) {
  107|       |    DWORD error = GetLastError();
  108|       |    if (error != ERROR_ENVVAR_NOT_FOUND) {
  109|       |      __kmp_fatal(KMP_MSG(CantGetEnvVar, name), KMP_ERR(error), __kmp_msg_null);
  110|       |    }
  111|       |    // Variable is not found, it's ok, just continue.
  112|       |  } else {
  113|       |    DWORD len = rc;
  114|       |    result = (char *)KMP_INTERNAL_MALLOC(len);
  115|       |    if (result == NULL) {
  116|       |      KMP_FATAL(MemoryAllocFailed);
  117|       |    }
  118|       |    rc = GetEnvironmentVariable(name, result, len);
  119|       |    if (!rc) {
  120|       |      // GetEnvironmentVariable() may return 0 if variable is empty.
  121|       |      // In such a case GetLastError() returns ERROR_SUCCESS.
  122|       |      DWORD error = GetLastError();
  123|       |      if (error != ERROR_SUCCESS) {
  124|       |        // Unexpected error. The variable should be in the environment,
  125|       |        // and buffer should be large enough.
  126|       |        __kmp_fatal(KMP_MSG(CantGetEnvVar, name), KMP_ERR(error),
  127|       |                    __kmp_msg_null);
  128|       |        KMP_INTERNAL_FREE((void *)result);
  129|       |        result = NULL;
  130|       |      }
  131|       |    }
  132|       |  }
  133|       |#else
  134|       |#error Unknown or unsupported OS.
  135|       |#endif
  136|       |
  137|      3|  return result;
  138|       |
  139|      3|} // func __kmp_env_get
__kmp_env_set:
  173|      1|void __kmp_env_set(char const *name, char const *value, int overwrite) {
  174|       |
  175|      1|#if KMP_OS_UNIX
  176|      1|  int rc = setenv(name, value, overwrite);
  177|      1|  if (rc != 0) {
  ------------------
  |  Branch (177:7): [True: 0, False: 1]
  ------------------
  178|       |    // Dead code. I tried to put too many variables into Linux* OS
  179|       |    // environment on IA-32 architecture. When application consumes
  180|       |    // more than ~2.5 GB of memory, entire system feels bad. Sometimes
  181|       |    // application is killed (by OS?), sometimes system stops
  182|       |    // responding... But this error message never appears. --ln
  183|      0|    __kmp_fatal(KMP_MSG(CantSetEnvVar, name), KMP_HNT(NotEnoughMemory),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                  __kmp_fatal(KMP_MSG(CantSetEnvVar, name), KMP_HNT(NotEnoughMemory),
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  184|      0|                __kmp_msg_null);
  185|      0|  }
  186|       |#elif KMP_OS_WINDOWS
  187|       |  BOOL rc;
  188|       |  if (!overwrite) {
  189|       |    rc = GetEnvironmentVariable(name, NULL, 0);
  190|       |    if (rc) {
  191|       |      // Variable exists, do not overwrite.
  192|       |      return;
  193|       |    }
  194|       |    DWORD error = GetLastError();
  195|       |    if (error != ERROR_ENVVAR_NOT_FOUND) {
  196|       |      __kmp_fatal(KMP_MSG(CantGetEnvVar, name), KMP_ERR(error), __kmp_msg_null);
  197|       |    }
  198|       |  }
  199|       |  rc = SetEnvironmentVariable(name, value);
  200|       |  if (!rc) {
  201|       |    DWORD error = GetLastError();
  202|       |    __kmp_fatal(KMP_MSG(CantSetEnvVar, name), KMP_ERR(error), __kmp_msg_null);
  203|       |  }
  204|       |#else
  205|       |#error Unknown or unsupported OS.
  206|       |#endif
  207|       |
  208|      1|} // func __kmp_env_set
__kmp_env_unset:
  210|      1|void __kmp_env_unset(char const *name) {
  211|       |
  212|      1|#if KMP_OS_UNIX
  213|      1|  unsetenv(name);
  214|       |#elif KMP_OS_WINDOWS
  215|       |  BOOL rc = SetEnvironmentVariable(name, NULL);
  216|       |  if (!rc) {
  217|       |    DWORD error = GetLastError();
  218|       |    __kmp_fatal(KMP_MSG(CantSetEnvVar, name), KMP_ERR(error), __kmp_msg_null);
  219|       |  }
  220|       |#else
  221|       |#error Unknown or unsupported OS.
  222|       |#endif
  223|       |
  224|      1|} // func __kmp_env_unset
__kmp_env_blk_init:
  431|      2|) {
  432|       |
  433|      2|  if (bulk != NULL) {
  ------------------
  |  Branch (433:7): [True: 0, False: 2]
  ------------------
  434|      0|    ___kmp_env_blk_parse_string(block, bulk);
  435|      2|  } else {
  436|      2|#if KMP_OS_UNIX
  437|      2|    ___kmp_env_blk_parse_unix(block, environ);
  438|       |#elif KMP_OS_WINDOWS
  439|       |    {
  440|       |      char *mem = GetEnvironmentStrings();
  441|       |      if (mem == NULL) {
  442|       |        DWORD error = GetLastError();
  443|       |        __kmp_fatal(KMP_MSG(CantGetEnvironment), KMP_ERR(error),
  444|       |                    __kmp_msg_null);
  445|       |      }
  446|       |      ___kmp_env_blk_parse_windows(block, mem);
  447|       |      FreeEnvironmentStrings(mem);
  448|       |    }
  449|       |#else
  450|       |#error Unknown or unsupported OS.
  451|       |#endif
  452|      2|  }
  453|       |
  454|      2|} // __kmp_env_blk_init
__kmp_env_blk_sort:
  463|      1|) {
  464|       |
  465|      1|  qsort(CCAST(kmp_env_var_t *, block->vars), block->count,
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
  466|      1|        sizeof(kmp_env_var_t),
  467|      1|        (int (*)(void const *, void const *)) & ___kmp_env_var_cmp);
  468|       |
  469|      1|} // __kmp_env_block_sort
__kmp_env_blk_free:
  473|      2|) {
  474|       |
  475|      2|  KMP_INTERNAL_FREE(CCAST(kmp_env_var_t *, block->vars));
  ------------------
  |  |  111|      2|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  476|      2|  __kmp_str_free(&(block->bulk));
  477|       |
  478|      2|  block->count = 0;
  479|      2|  block->vars = NULL;
  480|       |
  481|      2|} // __kmp_env_blk_free
__kmp_env_blk_var:
  486|      3|) {
  487|       |
  488|      3|  int i;
  489|    105|  for (i = 0; i < block->count; ++i) {
  ------------------
  |  Branch (489:15): [True: 102, False: 3]
  ------------------
  490|    102|    if (strcmp(block->vars[i].name, name) == 0) {
  ------------------
  |  Branch (490:9): [True: 0, False: 102]
  ------------------
  491|      0|      return block->vars[i].value;
  492|      0|    }
  493|    102|  }
  494|      3|  return NULL;
  495|       |
  496|      3|} // __kmp_env_block_var
kmp_environment.cpp:_ZL8allocatem:
   76|      4|static inline void *allocate(size_t size) {
   77|      4|  void *ptr = KMP_INTERNAL_MALLOC(size);
  ------------------
  |  |  110|      4|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
   78|      4|  if (ptr == NULL) {
  ------------------
  |  Branch (78:7): [True: 0, False: 4]
  ------------------
   79|      0|    KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
   80|      0|  }
   81|      4|  return ptr;
   82|      4|} // allocate
kmp_environment.cpp:_ZL25___kmp_env_blk_parse_unixP13__kmp_env_blkPPc:
  383|      2|) {
  384|      2|  char *bulk = NULL;
  385|      2|  kmp_env_var_t *vars = NULL;
  386|      2|  int count = 0;
  387|      2|  size_t size = 0; // Size of bulk.
  388|       |
  389|       |  // Count number of variables and length of required bulk.
  390|      2|  {
  391|     69|    while (env[count] != NULL) {
  ------------------
  |  Branch (391:12): [True: 67, False: 2]
  ------------------
  392|     67|      size += KMP_STRLEN(env[count]) + 1;
  ------------------
  |  |   68|     67|#define KMP_STRLEN strlen
  ------------------
  393|     67|      ++count;
  394|     67|    }
  395|      2|  }
  396|       |
  397|       |  // Allocate memory.
  398|      2|  bulk = (char *)allocate(size);
  399|      2|  vars = (kmp_env_var_t *)allocate(count * sizeof(kmp_env_var_t));
  400|       |
  401|       |  // Loop thru all the vars.
  402|      2|  {
  403|      2|    char *var; // Pointer to beginning of var.
  404|      2|    char *name; // Pointer to name of variable.
  405|      2|    char *value; // Pointer to value.
  406|      2|    size_t len; // Length of variable.
  407|      2|    int i;
  408|      2|    var = bulk;
  409|     69|    for (i = 0; i < count; ++i) {
  ------------------
  |  Branch (409:17): [True: 67, False: 2]
  ------------------
  410|       |      // Copy variable to bulk.
  411|     67|      len = KMP_STRLEN(env[i]);
  ------------------
  |  |   68|     67|#define KMP_STRLEN strlen
  ------------------
  412|     67|      KMP_MEMCPY_S(var, size, env[i], len + 1);
  ------------------
  |  |   60|     67|#define KMP_MEMCPY_S(dst, bsz, src, cnt) memcpy(dst, src, cnt)
  ------------------
  413|       |      // Save found variable in vars array.
  414|     67|      __kmp_str_split(var, '=', &name, &value);
  415|     67|      vars[i].name = name;
  416|     67|      vars[i].value = value;
  417|       |      // Move pointer.
  418|     67|      var += len + 1;
  419|     67|    }
  420|      2|  }
  421|       |
  422|       |  // Fill out result.
  423|      2|  block->bulk = bulk;
  424|      2|  block->vars = vars;
  425|      2|  block->count = count;
  426|      2|}
kmp_environment.cpp:_ZL18___kmp_env_var_cmpPK13__kmp_env_varS1_:
  457|    122|    kmp_env_var_t const *lhs, kmp_env_var_t const *rhs) {
  458|    122|  return strcmp(lhs->name, rhs->name);
  459|    122|}

omp_init_lock:
 1136|  6.16k|void FTN_STDCALL KMP_EXPAND_NAME(FTN_INIT_LOCK)(void **user_lock) {
 1137|       |#ifdef KMP_STUB
 1138|       |  *((kmp_stub_lock_t *)user_lock) = UNLOCKED;
 1139|       |#else
 1140|  6.16k|  int gtid = __kmp_entry_gtid();
  ------------------
  |  | 3467|  6.16k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 1141|  6.16k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 1142|  6.16k|  OMPT_STORE_RETURN_ADDRESS(gtid);
  ------------------
  |  |   92|  6.16k|  OmptReturnAddressGuard ReturnAddressGuard{gtid, __builtin_return_address(0)};
  ------------------
 1143|  6.16k|#endif
 1144|       |  __kmpc_init_lock(NULL, gtid, user_lock);
 1145|  6.16k|#endif
 1146|  6.16k|}
omp_destroy_lock:
 1161|  6.16k|void FTN_STDCALL KMP_EXPAND_NAME(FTN_DESTROY_LOCK)(void **user_lock) {
 1162|       |#ifdef KMP_STUB
 1163|       |  *((kmp_stub_lock_t *)user_lock) = UNINIT;
 1164|       |#else
 1165|  6.16k|  int gtid = __kmp_entry_gtid();
  ------------------
  |  | 3467|  6.16k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 1166|  6.16k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 1167|  6.16k|  OMPT_STORE_RETURN_ADDRESS(gtid);
  ------------------
  |  |   92|  6.16k|  OmptReturnAddressGuard ReturnAddressGuard{gtid, __builtin_return_address(0)};
  ------------------
 1168|  6.16k|#endif
 1169|       |  __kmpc_destroy_lock(NULL, gtid, user_lock);
 1170|  6.16k|#endif
 1171|  6.16k|}

__kmp_i18n_catopen:
   62|      1|void __kmp_i18n_catopen() {
   63|      1|  if (status == KMP_I18N_CLOSED) {
  ------------------
  |  Branch (63:7): [True: 1, False: 0]
  ------------------
   64|      1|    __kmp_acquire_bootstrap_lock(&lock);
   65|      1|    if (status == KMP_I18N_CLOSED) {
  ------------------
  |  Branch (65:9): [True: 1, False: 0]
  ------------------
   66|      1|      __kmp_i18n_do_catopen();
   67|      1|    }
   68|      1|    __kmp_release_bootstrap_lock(&lock);
   69|      1|  }
   70|      1|} // func __kmp_i18n_catopen
__kmp_i18n_catclose:
  178|      1|void __kmp_i18n_catclose() {
  179|      1|  if (status == KMP_I18N_OPENED) {
  ------------------
  |  Branch (179:7): [True: 0, False: 1]
  ------------------
  180|      0|    KMP_DEBUG_ASSERT(cat != KMP_I18N_NULLCAT);
  181|      0|    catclose(cat);
  182|      0|    cat = KMP_I18N_NULLCAT;
  ------------------
  |  |   78|      0|#define KMP_I18N_NULLCAT ((nl_catd)(-1))
  ------------------
  183|      0|  }
  184|      1|  status = KMP_I18N_CLOSED;
  185|      1|} // func __kmp_i18n_catclose
__kmp_i18n_catgets:
  187|     10|char const *__kmp_i18n_catgets(kmp_i18n_id_t id) {
  188|       |
  189|     10|  int section = get_section(id);
  ------------------
  |  |   33|     10|#define get_section(id) ((id) >> 16)
  ------------------
  190|     10|  int number = get_number(id);
  ------------------
  |  |   34|     10|#define get_number(id) ((id)&0xFFFF)
  ------------------
  191|     10|  char const *message = NULL;
  192|       |
  193|     10|  if (1 <= section && section <= __kmp_i18n_default_table.size) {
  ------------------
  |  Branch (193:7): [True: 10, False: 0]
  |  Branch (193:23): [True: 10, False: 0]
  ------------------
  194|     10|    if (1 <= number && number <= __kmp_i18n_default_table.sect[section].size) {
  ------------------
  |  Branch (194:9): [True: 10, False: 0]
  |  Branch (194:24): [True: 10, False: 0]
  ------------------
  195|     10|      if (status == KMP_I18N_CLOSED) {
  ------------------
  |  Branch (195:11): [True: 1, False: 9]
  ------------------
  196|      1|        __kmp_i18n_catopen();
  197|      1|      }
  198|     10|      if (status == KMP_I18N_OPENED) {
  ------------------
  |  Branch (198:11): [True: 0, False: 10]
  ------------------
  199|      0|        message = catgets(cat, section, number,
  200|      0|                          __kmp_i18n_default_table.sect[section].str[number]);
  201|      0|      }
  202|     10|      if (message == NULL) {
  ------------------
  |  Branch (202:11): [True: 10, False: 0]
  ------------------
  203|     10|        message = __kmp_i18n_default_table.sect[section].str[number];
  204|     10|      }
  205|     10|    }
  206|     10|  }
  207|     10|  if (message == NULL) {
  ------------------
  |  Branch (207:7): [True: 0, False: 10]
  ------------------
  208|      0|    message = no_message_available;
  209|      0|  }
  210|     10|  return message;
  211|       |
  212|     10|} // func __kmp_i18n_catgets
__kmp_msg_format:
  624|      1|kmp_msg_t __kmp_msg_format(unsigned id_arg, ...) {
  625|       |
  626|      1|  kmp_msg_t msg;
  627|      1|  va_list args;
  628|      1|  kmp_str_buf_t buffer;
  629|      1|  __kmp_str_buf_init(&buffer);
  ------------------
  |  |   41|      1|  {                                                                            \
  |  |   42|      1|    (b)->str = (b)->bulk;                                                      \
  |  |   43|      1|    (b)->size = sizeof((b)->bulk);                                             \
  |  |   44|      1|    (b)->used = 0;                                                             \
  |  |   45|      1|    (b)->bulk[0] = 0;                                                          \
  |  |   46|      1|  }
  ------------------
  630|       |
  631|      1|  va_start(args, id_arg);
  632|       |
  633|       |  // We use unsigned for the ID argument and explicitly cast it here to the
  634|       |  // right enumerator because variadic functions are not compatible with
  635|       |  // default promotions.
  636|      1|  kmp_i18n_id_t id = (kmp_i18n_id_t)id_arg;
  637|       |
  638|      1|#if KMP_OS_UNIX
  639|       |  // On Linux* OS and OS X*, printf() family functions process parameter
  640|       |  // numbers, for example:  "%2$s %1$s".
  641|      1|  __kmp_str_buf_vprint(&buffer, __kmp_i18n_catgets(id), args);
  642|       |#elif KMP_OS_WINDOWS
  643|       |  // On Windows, printf() family functions does not recognize GNU style
  644|       |  // parameter numbers, so we have to use FormatMessage() instead. It recognizes
  645|       |  // parameter numbers, e. g.:  "%2!s! "%1!s!".
  646|       |  {
  647|       |    LPTSTR str = NULL;
  648|       |    int len;
  649|       |    FormatMessage(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER,
  650|       |                  __kmp_i18n_catgets(id), 0, 0, (LPTSTR)(&str), 0, &args);
  651|       |    len = ___strip_crs(str);
  652|       |    __kmp_str_buf_cat(&buffer, str, len);
  653|       |    LocalFree(str);
  654|       |  }
  655|       |#else
  656|       |#error
  657|       |#endif
  658|      1|  va_end(args);
  659|      1|  __kmp_str_buf_detach(&buffer);
  660|       |
  661|      1|  msg.type = (kmp_msg_type_t)(id >> 16);
  662|      1|  msg.num = id & 0xFFFF;
  663|      1|  msg.str = buffer.str;
  664|      1|  msg.len = buffer.used;
  665|       |
  666|      1|  return msg;
  667|       |
  668|      1|} // __kmp_msg_format
kmp_i18n.cpp:_ZL21__kmp_i18n_do_catopenv:
   89|      1|void __kmp_i18n_do_catopen() {
   90|      1|  int english = 0;
   91|      1|  char *lang = __kmp_env_get("LANG");
   92|       |  // TODO: What about LC_ALL or LC_MESSAGES?
   93|       |
   94|      1|  KMP_DEBUG_ASSERT(status == KMP_I18N_CLOSED);
   95|      1|  KMP_DEBUG_ASSERT(cat == KMP_I18N_NULLCAT);
   96|       |
   97|      1|  english = lang == NULL || // In all these cases English language is used.
  ------------------
  |  Branch (97:13): [True: 1, False: 0]
  ------------------
   98|      0|            strcmp(lang, "") == 0 || strcmp(lang, " ") == 0 ||
  ------------------
  |  Branch (98:13): [True: 0, False: 0]
  |  Branch (98:38): [True: 0, False: 0]
  ------------------
   99|       |            // Workaround for Fortran RTL bug DPD200137873 "Fortran runtime
  100|       |            // resets LANG env var to space if it is not set".
  101|      0|            strcmp(lang, "C") == 0 || strcmp(lang, "POSIX") == 0;
  ------------------
  |  Branch (101:13): [True: 0, False: 0]
  |  Branch (101:39): [True: 0, False: 0]
  ------------------
  102|       |
  103|      1|  if (!english) { // English language is not yet detected, let us continue.
  ------------------
  |  Branch (103:7): [True: 0, False: 1]
  ------------------
  104|       |    // Format of LANG is: [language[_territory][.codeset][@modifier]]
  105|       |    // Strip all parts except language.
  106|      0|    char *tail = NULL;
  107|      0|    __kmp_str_split(lang, '@', &lang, &tail);
  108|      0|    __kmp_str_split(lang, '.', &lang, &tail);
  109|      0|    __kmp_str_split(lang, '_', &lang, &tail);
  110|      0|    english = (strcmp(lang, "en") == 0);
  111|      0|  }
  112|       |
  113|      1|  KMP_INTERNAL_FREE(lang);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  114|       |
  115|       |  // Do not try to open English catalog because internal messages are
  116|       |  // exact copy of messages in English catalog.
  117|      1|  if (english) {
  ------------------
  |  Branch (117:7): [True: 1, False: 0]
  ------------------
  118|      1|    status = KMP_I18N_ABSENT; // mark catalog as absent so it will not
  119|       |    // be re-opened.
  120|      1|    return;
  121|      1|  }
  122|       |
  123|      0|  cat = catopen(name, 0);
  124|       |  // TODO: Why do we pass 0 in flags?
  125|      0|  status = (cat == KMP_I18N_NULLCAT ? KMP_I18N_ABSENT : KMP_I18N_OPENED);
  ------------------
  |  |   78|      0|#define KMP_I18N_NULLCAT ((nl_catd)(-1))
  ------------------
  |  Branch (125:13): [True: 0, False: 0]
  ------------------
  126|       |
  127|      0|  if (status == KMP_I18N_ABSENT) {
  ------------------
  |  Branch (127:7): [True: 0, False: 0]
  ------------------
  128|      0|    if (__kmp_generate_warnings > kmp_warnings_low) {
  ------------------
  |  Branch (128:9): [True: 0, False: 0]
  ------------------
  129|       |      // AC: only issue warning in case explicitly asked to
  130|      0|      int error = errno; // Save errno immediately.
  131|      0|      char *nlspath = __kmp_env_get("NLSPATH");
  132|      0|      char *lang = __kmp_env_get("LANG");
  133|       |
  134|       |      // Infinite recursion will not occur -- status is KMP_I18N_ABSENT now, so
  135|       |      // __kmp_i18n_catgets() will not try to open catalog, but will return
  136|       |      // default message.
  137|      0|      kmp_msg_t err_code = KMP_ERR(error);
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  138|      0|      __kmp_msg(kmp_ms_warning, KMP_MSG(CantOpenMessageCatalog, name), err_code,
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
  139|      0|                KMP_HNT(CheckEnvVar, "NLSPATH", nlspath),
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  140|      0|                KMP_HNT(CheckEnvVar, "LANG", lang), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  141|      0|      if (__kmp_generate_warnings == kmp_warnings_off) {
  ------------------
  |  Branch (141:11): [True: 0, False: 0]
  ------------------
  142|      0|        __kmp_str_free(&err_code.str);
  143|      0|      }
  144|       |
  145|      0|      KMP_INFORM(WillUseDefaultMessages);
  ------------------
  |  |  143|      0|  __kmp_msg(kmp_ms_inform, KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  146|      0|      KMP_INTERNAL_FREE(nlspath);
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  147|      0|      KMP_INTERNAL_FREE(lang);
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  148|      0|    }
  149|      0|  } else { // status == KMP_I18N_OPENED
  150|      0|    int section = get_section(kmp_i18n_prp_Version);
  ------------------
  |  |   33|      0|#define get_section(id) ((id) >> 16)
  ------------------
  151|      0|    int number = get_number(kmp_i18n_prp_Version);
  ------------------
  |  |   34|      0|#define get_number(id) ((id)&0xFFFF)
  ------------------
  152|      0|    char const *expected = __kmp_i18n_default_table.sect[section].str[number];
  153|       |    // Expected version of the catalog.
  154|      0|    kmp_str_buf_t version; // Actual version of the catalog.
  155|      0|    __kmp_str_buf_init(&version);
  ------------------
  |  |   41|      0|  {                                                                            \
  |  |   42|      0|    (b)->str = (b)->bulk;                                                      \
  |  |   43|      0|    (b)->size = sizeof((b)->bulk);                                             \
  |  |   44|      0|    (b)->used = 0;                                                             \
  |  |   45|      0|    (b)->bulk[0] = 0;                                                          \
  |  |   46|      0|  }
  ------------------
  156|      0|    __kmp_str_buf_print(&version, "%s", catgets(cat, section, number, NULL));
  157|       |
  158|       |    // String returned by catgets is invalid after closing catalog, so copy it.
  159|      0|    if (strcmp(version.str, expected) != 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  ------------------
  160|      0|      __kmp_i18n_catclose(); // Close bad catalog.
  161|      0|      status = KMP_I18N_ABSENT; // And mark it as absent.
  162|      0|      if (__kmp_generate_warnings > kmp_warnings_low) {
  ------------------
  |  Branch (162:11): [True: 0, False: 0]
  ------------------
  163|       |        // AC: only issue warning in case explicitly asked to
  164|       |        // And now print a warning using default messages.
  165|      0|        char const *name = "NLSPATH";
  166|      0|        char const *nlspath = __kmp_env_get(name);
  167|      0|        __kmp_msg(kmp_ms_warning,
  168|      0|                  KMP_MSG(WrongMessageCatalog, name, version.str, expected),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
  169|      0|                  KMP_HNT(CheckEnvVar, name, nlspath), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  170|      0|        KMP_INFORM(WillUseDefaultMessages);
  ------------------
  |  |  143|      0|  __kmp_msg(kmp_ms_inform, KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  171|      0|        KMP_INTERNAL_FREE(CCAST(char *, nlspath));
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  172|      0|      } // __kmp_generate_warnings
  173|      0|    }
  174|      0|    __kmp_str_buf_free(&version);
  175|      0|  }
  176|      0|} // func __kmp_i18n_do_catopen

__kmp_validate_locks:
   43|      1|void __kmp_validate_locks(void) {
   44|      1|  int i;
   45|      1|  kmp_uint32 x, y;
   46|       |
   47|       |  /* Check to make sure unsigned arithmetic does wraps properly */
   48|      1|  x = ~((kmp_uint32)0) - 2;
   49|      1|  y = x - 2;
   50|       |
   51|      9|  for (i = 0; i < 8; ++i, ++x, ++y) {
  ------------------
  |  Branch (51:15): [True: 8, False: 1]
  ------------------
   52|      8|    kmp_uint32 z = (x - y);
   53|      8|    KMP_ASSERT(z == 2);
  ------------------
  |  |   50|      8|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 8]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
   54|      8|  }
   55|       |
   56|      1|  KMP_ASSERT(offsetof(kmp_base_queuing_lock, tail_id) % 8 == 0);
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [Folded, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
   57|      1|}
__kmp_acquire_ticket_lock:
  644|  12.3k|int __kmp_acquire_ticket_lock(kmp_ticket_lock_t *lck, kmp_int32 gtid) {
  645|  12.3k|  int retval = __kmp_acquire_ticket_lock_timed_template(lck, gtid);
  646|  12.3k|  return retval;
  647|  12.3k|}
__kmp_release_ticket_lock:
  714|  12.3k|int __kmp_release_ticket_lock(kmp_ticket_lock_t *lck, kmp_int32 gtid) {
  715|  12.3k|  kmp_uint32 distance = std::atomic_load_explicit(&lck->lk.next_ticket,
  716|  12.3k|                                                  std::memory_order_relaxed) -
  717|  12.3k|                        std::atomic_load_explicit(&lck->lk.now_serving,
  718|  12.3k|                                                  std::memory_order_relaxed);
  719|       |
  720|  12.3k|  std::atomic_fetch_add_explicit(&lck->lk.now_serving, 1U,
  721|  12.3k|                                 std::memory_order_release);
  722|       |
  723|  12.3k|  KMP_YIELD(distance >
  ------------------
  |  | 1529|  12.3k|  {                                                                            \
  |  | 1530|  12.3k|    KMP_CPU_PAUSE();                                                           \
  |  |  ------------------
  |  |  |  | 1498|  12.3k|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  |  |  ------------------
  |  | 1531|  24.6k|    if ((cond) && (KMP_TRY_YIELD))                                             \
  |  |  ------------------
  |  |  |  | 1523|      1|  ((__kmp_use_yield == 1) || (__kmp_use_yield == 2 && (KMP_OVERSUBSCRIBED)))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1520|      0|  (TCR_4(__kmp_nth) > (__kmp_avail_proc ? __kmp_avail_proc : __kmp_xproc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1127|      0|#define TCR_4(a) (a)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1520:24): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1523:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (1523:31): [True: 0, False: 0]
  |  |  |  |  |  Branch (1523:55): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1531:9): [True: 1, False: 12.3k]
  |  |  |  Branch (1531:10): [True: 0, False: 12.3k]
  |  |  ------------------
  |  | 1532|  12.3k|      __kmp_yield();                                                           \
  |  | 1533|  12.3k|  }
  ------------------
  724|  12.3k|            (kmp_uint32)(__kmp_avail_proc ? __kmp_avail_proc : __kmp_xproc));
  725|  12.3k|  return KMP_LOCK_RELEASED;
  ------------------
  |  |  156|  12.3k|#define KMP_LOCK_RELEASED 1
  ------------------
  726|  12.3k|}
__kmp_init_ticket_lock:
  753|      6|void __kmp_init_ticket_lock(kmp_ticket_lock_t *lck) {
  754|       |  lck->lk.location = NULL;
  755|      6|  lck->lk.self = lck;
  756|      6|  std::atomic_store_explicit(&lck->lk.next_ticket, 0U,
  757|      6|                             std::memory_order_relaxed);
  758|      6|  std::atomic_store_explicit(&lck->lk.now_serving, 0U,
  759|      6|                             std::memory_order_relaxed);
  760|      6|  std::atomic_store_explicit(
  761|      6|      &lck->lk.owner_id, 0,
  762|      6|      std::memory_order_relaxed); // no thread owns the lock.
  763|      6|  std::atomic_store_explicit(
  764|      6|      &lck->lk.depth_locked, -1,
  765|      6|      std::memory_order_relaxed); // -1 => not a nested lock.
  766|      6|  std::atomic_store_explicit(&lck->lk.initialized, true,
  767|      6|                             std::memory_order_release);
  768|      6|}
__kmp_init_queuing_lock:
 1516|  6.17k|void __kmp_init_queuing_lock(kmp_queuing_lock_t *lck) {
 1517|  6.17k|  lck->lk.location = NULL;
 1518|  6.17k|  lck->lk.head_id = 0;
 1519|  6.17k|  lck->lk.tail_id = 0;
 1520|  6.17k|  lck->lk.next_ticket = 0;
 1521|  6.17k|  lck->lk.now_serving = 0;
 1522|  6.17k|  lck->lk.owner_id = 0; // no thread owns the lock.
 1523|  6.17k|  lck->lk.depth_locked = -1; // >= 0 for nestable locks, -1 for simple locks.
 1524|  6.17k|  lck->lk.initialized = lck;
 1525|       |
 1526|  6.17k|  KA_TRACE(1000, ("__kmp_init_queuing_lock: lock %p initialized\n", lck));
 1527|  6.17k|}
__kmp_destroy_queuing_lock:
 1529|  6.16k|void __kmp_destroy_queuing_lock(kmp_queuing_lock_t *lck) {
 1530|  6.16k|  lck->lk.initialized = NULL;
 1531|       |  lck->lk.location = NULL;
 1532|  6.16k|  lck->lk.head_id = 0;
 1533|  6.16k|  lck->lk.tail_id = 0;
 1534|  6.16k|  lck->lk.next_ticket = 0;
 1535|  6.16k|  lck->lk.now_serving = 0;
 1536|  6.16k|  lck->lk.owner_id = 0;
 1537|  6.16k|  lck->lk.depth_locked = -1;
 1538|  6.16k|}
__kmp_allocate_indirect_lock:
 3122|  6.16k|                                                  kmp_indirect_locktag_t tag) {
 3123|  6.16k|  kmp_indirect_lock_t *lck;
 3124|  6.16k|  kmp_lock_index_t idx, table_idx;
 3125|       |
 3126|  6.16k|  __kmp_acquire_lock(&__kmp_global_lock, gtid);
 3127|       |
 3128|  6.16k|  if (__kmp_indirect_lock_pool[tag] != NULL) {
  ------------------
  |  Branch (3128:7): [True: 6.16k, False: 2]
  ------------------
 3129|       |    // Reuse the allocated and destroyed lock object
 3130|  6.16k|    lck = __kmp_indirect_lock_pool[tag];
 3131|  6.16k|    if (OMP_LOCK_T_SIZE < sizeof(void *))
  ------------------
  |  |   54|  6.16k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3131:9): [True: 6.16k, Folded]
  ------------------
 3132|  6.16k|      idx = lck->lock->pool.index;
 3133|  6.16k|    __kmp_indirect_lock_pool[tag] = (kmp_indirect_lock_t *)lck->lock->pool.next;
 3134|  6.16k|    KA_TRACE(20, ("__kmp_allocate_indirect_lock: reusing an existing lock %p\n",
 3135|  6.16k|                  lck));
 3136|  6.16k|  } else {
 3137|      2|    kmp_uint32 row, col;
 3138|      2|    kmp_indirect_lock_table_t *lock_table = &__kmp_i_lock_table;
 3139|      2|    idx = 0;
 3140|       |    // Find location in list of lock tables to put new lock
 3141|      2|    while (1) {
  ------------------
  |  Branch (3141:12): [True: 2, Folded]
  ------------------
 3142|      2|      table_idx = lock_table->next; // index within this table
 3143|      2|      idx += lock_table->next; // global index within list of tables
 3144|      2|      if (table_idx < lock_table->nrow_ptrs * KMP_I_LOCK_CHUNK) {
  ------------------
  |  | 1222|      2|#define KMP_I_LOCK_CHUNK 1024
  ------------------
  |  Branch (3144:11): [True: 2, False: 0]
  ------------------
 3145|      2|        row = table_idx / KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|      2|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 3146|      2|        col = table_idx % KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|      2|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 3147|       |        // Allocate a new row of locks if necessary
 3148|      2|        if (!lock_table->table[row]) {
  ------------------
  |  Branch (3148:13): [True: 0, False: 2]
  ------------------
 3149|      0|          lock_table->table[row] = (kmp_indirect_lock_t *)__kmp_allocate(
  ------------------
  |  | 3617|      0|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3150|      0|              sizeof(kmp_indirect_lock_t) * KMP_I_LOCK_CHUNK);
 3151|      0|        }
 3152|      2|        break;
 3153|      2|      }
 3154|       |      // Allocate a new lock table if necessary with double the capacity
 3155|      0|      if (!lock_table->next_table) {
  ------------------
  |  Branch (3155:11): [True: 0, False: 0]
  ------------------
 3156|      0|        kmp_indirect_lock_table_t *next_table =
 3157|      0|            (kmp_indirect_lock_table_t *)__kmp_allocate(
  ------------------
  |  | 3617|      0|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3158|      0|                sizeof(kmp_indirect_lock_table_t));
 3159|      0|        next_table->table = (kmp_indirect_lock_t **)__kmp_allocate(
  ------------------
  |  | 3617|      0|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3160|      0|            sizeof(kmp_indirect_lock_t *) * 2 * lock_table->nrow_ptrs);
 3161|      0|        next_table->nrow_ptrs = 2 * lock_table->nrow_ptrs;
 3162|      0|        next_table->next = 0;
 3163|      0|        next_table->next_table = nullptr;
 3164|      0|        lock_table->next_table = next_table;
 3165|      0|      }
 3166|      0|      lock_table = lock_table->next_table;
 3167|      0|      KMP_ASSERT(lock_table);
  ------------------
  |  |   50|      0|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 3168|      0|    }
 3169|      2|    lock_table->next++;
 3170|       |
 3171|      2|    lck = &lock_table->table[row][col];
 3172|       |    // Allocate a new base lock object
 3173|      2|    lck->lock = (kmp_user_lock_p)__kmp_allocate(__kmp_indirect_lock_size[tag]);
  ------------------
  |  | 3617|      2|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3174|      2|    KA_TRACE(20,
 3175|      2|             ("__kmp_allocate_indirect_lock: allocated a new lock %p\n", lck));
 3176|      2|  }
 3177|       |
 3178|  6.16k|  __kmp_release_lock(&__kmp_global_lock, gtid);
 3179|       |
 3180|  6.16k|  lck->type = tag;
 3181|       |
 3182|  6.16k|  if (OMP_LOCK_T_SIZE < sizeof(void *)) {
  ------------------
  |  |   54|  6.16k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3182:7): [True: 6.16k, Folded]
  ------------------
 3183|  6.16k|    *((kmp_lock_index_t *)user_lock) = idx
 3184|  6.16k|                                       << 1; // indirect lock word must be even
 3185|  6.16k|  } else {
 3186|      0|    *((kmp_indirect_lock_t **)user_lock) = lck;
 3187|      0|  }
 3188|       |
 3189|  6.16k|  return lck;
 3190|  6.16k|}
__kmp_init_dynamic_user_locks:
 3327|      1|void __kmp_init_dynamic_user_locks() {
 3328|       |  // Initialize jump table for the lock functions
 3329|      1|  if (__kmp_env_consistency_check) {
  ------------------
  |  Branch (3329:7): [True: 0, False: 1]
  ------------------
 3330|      0|    __kmp_direct_set = direct_set_check;
 3331|      0|    __kmp_direct_unset = direct_unset_check;
 3332|      0|    __kmp_direct_test = direct_test_check;
 3333|      0|    __kmp_direct_destroy = direct_destroy_check;
 3334|      0|    __kmp_indirect_set = indirect_set_check;
 3335|      0|    __kmp_indirect_unset = indirect_unset_check;
 3336|      0|    __kmp_indirect_test = indirect_test_check;
 3337|      0|    __kmp_indirect_destroy = indirect_destroy_check;
 3338|      1|  } else {
 3339|      1|    __kmp_direct_set = direct_set;
 3340|      1|    __kmp_direct_unset = direct_unset;
 3341|      1|    __kmp_direct_test = direct_test;
 3342|      1|    __kmp_direct_destroy = direct_destroy;
 3343|      1|    __kmp_indirect_set = indirect_set;
 3344|      1|    __kmp_indirect_unset = indirect_unset;
 3345|      1|    __kmp_indirect_test = indirect_test;
 3346|      1|    __kmp_indirect_destroy = indirect_destroy;
 3347|      1|  }
 3348|       |  // If the user locks have already been initialized, then return. Allow the
 3349|       |  // switch between different KMP_CONSISTENCY_CHECK values, but do not allocate
 3350|       |  // new lock tables if they have already been allocated.
 3351|      1|  if (__kmp_init_user_locks)
  ------------------
  |  Branch (3351:7): [True: 0, False: 1]
  ------------------
 3352|      0|    return;
 3353|       |
 3354|       |  // Initialize lock index table
 3355|      1|  __kmp_i_lock_table.nrow_ptrs = KMP_I_LOCK_TABLE_INIT_NROW_PTRS;
  ------------------
  |  | 1226|      1|#define KMP_I_LOCK_TABLE_INIT_NROW_PTRS 8
  ------------------
 3356|      1|  __kmp_i_lock_table.table = (kmp_indirect_lock_t **)__kmp_allocate(
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3357|      1|      sizeof(kmp_indirect_lock_t *) * KMP_I_LOCK_TABLE_INIT_NROW_PTRS);
 3358|      1|  *(__kmp_i_lock_table.table) = (kmp_indirect_lock_t *)__kmp_allocate(
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3359|      1|      KMP_I_LOCK_CHUNK * sizeof(kmp_indirect_lock_t));
 3360|      1|  __kmp_i_lock_table.next = 0;
 3361|      1|  __kmp_i_lock_table.next_table = nullptr;
 3362|       |
 3363|       |  // Indirect lock size
 3364|      1|  __kmp_indirect_lock_size[locktag_ticket] = sizeof(kmp_ticket_lock_t);
 3365|      1|  __kmp_indirect_lock_size[locktag_queuing] = sizeof(kmp_queuing_lock_t);
 3366|      1|#if KMP_USE_ADAPTIVE_LOCKS
 3367|      1|  __kmp_indirect_lock_size[locktag_adaptive] = sizeof(kmp_adaptive_lock_t);
 3368|      1|#endif
 3369|      1|  __kmp_indirect_lock_size[locktag_drdpa] = sizeof(kmp_drdpa_lock_t);
 3370|      1|#if KMP_USE_TSX
 3371|      1|  __kmp_indirect_lock_size[locktag_rtm_queuing] = sizeof(kmp_queuing_lock_t);
 3372|      1|#endif
 3373|      1|  __kmp_indirect_lock_size[locktag_nested_tas] = sizeof(kmp_tas_lock_t);
 3374|      1|#if KMP_USE_FUTEX
 3375|      1|  __kmp_indirect_lock_size[locktag_nested_futex] = sizeof(kmp_futex_lock_t);
 3376|      1|#endif
 3377|      1|  __kmp_indirect_lock_size[locktag_nested_ticket] = sizeof(kmp_ticket_lock_t);
 3378|      1|  __kmp_indirect_lock_size[locktag_nested_queuing] = sizeof(kmp_queuing_lock_t);
 3379|      1|  __kmp_indirect_lock_size[locktag_nested_drdpa] = sizeof(kmp_drdpa_lock_t);
 3380|       |
 3381|       |// Initialize lock accessor/modifier
 3382|      1|#define fill_jumps(table, expand, sep)                                         \
 3383|      1|  {                                                                            \
 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
 3387|      1|  }
 3388|       |
 3389|      1|#if KMP_USE_ADAPTIVE_LOCKS
 3390|      1|#define fill_table(table, expand)                                              \
 3391|      1|  {                                                                            \
 3392|      1|    fill_jumps(table, expand, _);                                              \
 3393|      1|    table[locktag_adaptive] = expand(queuing);                                 \
 3394|      1|    fill_jumps(table, expand, _nested_);                                       \
 3395|      1|  }
 3396|       |#else
 3397|       |#define fill_table(table, expand)                                              \
 3398|       |  {                                                                            \
 3399|       |    fill_jumps(table, expand, _);                                              \
 3400|       |    fill_jumps(table, expand, _nested_);                                       \
 3401|       |  }
 3402|       |#endif // KMP_USE_ADAPTIVE_LOCKS
 3403|       |
 3404|      1|#define expand(l)                                                              \
 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  ------------------
  |  | 3391|      1|  {                                                                            \
  |  | 3392|      1|    fill_jumps(table, expand, _);                                              \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3393|      1|    table[locktag_adaptive] = expand(queuing);                                 \
  |  |  ------------------
  |  |  |  | 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  |  |  |  |  ------------------
  |  |  |  |  |  | 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3394|      1|    fill_jumps(table, expand, _nested_);                                       \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3406|      1|  fill_table(__kmp_indirect_set_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3405|      1|  (void (*)(kmp_user_lock_p, const ident_t *)) __kmp_set_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3395|      1|  }
  ------------------
 3407|      1|#undef expand
 3408|      1|#define expand(l)                                                              \
 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  ------------------
  |  | 3391|      1|  {                                                                            \
  |  | 3392|      1|    fill_jumps(table, expand, _);                                              \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3393|      1|    table[locktag_adaptive] = expand(queuing);                                 \
  |  |  ------------------
  |  |  |  | 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  |  |  |  |  ------------------
  |  |  |  |  |  | 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3394|      1|    fill_jumps(table, expand, _nested_);                                       \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3410|      1|  fill_table(__kmp_indirect_set_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3409|      1|  (void (*)(kmp_user_lock_p, kmp_lock_flags_t)) __kmp_set_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3395|      1|  }
  ------------------
 3411|      1|#undef expand
 3412|      1|#define expand(l)                                                              \
 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  ------------------
  |  | 3391|      1|  {                                                                            \
  |  | 3392|      1|    fill_jumps(table, expand, _);                                              \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3393|      1|    table[locktag_adaptive] = expand(queuing);                                 \
  |  |  ------------------
  |  |  |  | 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  |  |  |  |  ------------------
  |  |  |  |  |  | 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3394|      1|    fill_jumps(table, expand, _nested_);                                       \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3414|      1|  fill_table(__kmp_indirect_get_location, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3413|      1|  (const ident_t *(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_location
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3395|      1|  }
  ------------------
 3415|      1|#undef expand
 3416|      1|#define expand(l)                                                              \
 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  ------------------
  |  | 3391|      1|  {                                                                            \
  |  | 3392|      1|    fill_jumps(table, expand, _);                                              \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3393|      1|    table[locktag_adaptive] = expand(queuing);                                 \
  |  |  ------------------
  |  |  |  | 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  |  |  |  |  ------------------
  |  |  |  |  |  | 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3394|      1|    fill_jumps(table, expand, _nested_);                                       \
  |  |  ------------------
  |  |  |  | 3383|      1|  {                                                                            \
  |  |  |  | 3384|      1|    table[locktag##sep##ticket] = expand(ticket);                              \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3385|      1|    table[locktag##sep##queuing] = expand(queuing);                            \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3386|      1|    table[locktag##sep##drdpa] = expand(drdpa);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  | 3418|      1|  fill_table(__kmp_indirect_get_flags, expand);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3417|      1|  (kmp_lock_flags_t(*)(kmp_user_lock_p)) __kmp_get_##l##_lock_flags
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 3387|      1|  }
  |  |  ------------------
  |  | 3395|      1|  }
  ------------------
 3419|      1|#undef expand
 3420|       |
 3421|      1|  __kmp_init_user_locks = TRUE;
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 3422|      1|}
__kmp_cleanup_indirect_user_locks:
 3425|      1|void __kmp_cleanup_indirect_user_locks() {
 3426|      1|  int k;
 3427|       |
 3428|       |  // Clean up locks in the pools first (they were already destroyed before going
 3429|       |  // into the pools).
 3430|     11|  for (k = 0; k < KMP_NUM_I_LOCKS; ++k) {
  ------------------
  |  | 1081|     11|  (locktag_nested_drdpa + 1) // number of indirect lock types
  ------------------
  |  Branch (3430:15): [True: 10, False: 1]
  ------------------
 3431|     10|    kmp_indirect_lock_t *l = __kmp_indirect_lock_pool[k];
 3432|     12|    while (l != NULL) {
  ------------------
  |  Branch (3432:12): [True: 2, False: 10]
  ------------------
 3433|      2|      kmp_indirect_lock_t *ll = l;
 3434|      2|      l = (kmp_indirect_lock_t *)l->lock->pool.next;
 3435|      2|      KA_TRACE(20, ("__kmp_cleanup_indirect_user_locks: freeing %p from pool\n",
 3436|      2|                    ll));
 3437|      2|      __kmp_free(ll->lock);
  ------------------
  |  | 3619|      2|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3438|      2|      ll->lock = NULL;
 3439|      2|    }
 3440|     10|    __kmp_indirect_lock_pool[k] = NULL;
 3441|     10|  }
 3442|       |  // Clean up the remaining undestroyed locks.
 3443|      1|  kmp_indirect_lock_table_t *ptr = &__kmp_i_lock_table;
 3444|      2|  while (ptr) {
  ------------------
  |  Branch (3444:10): [True: 1, False: 1]
  ------------------
 3445|      9|    for (kmp_uint32 row = 0; row < ptr->nrow_ptrs; ++row) {
  ------------------
  |  Branch (3445:30): [True: 8, False: 1]
  ------------------
 3446|      8|      if (!ptr->table[row])
  ------------------
  |  Branch (3446:11): [True: 7, False: 1]
  ------------------
 3447|      7|        continue;
 3448|  1.02k|      for (kmp_uint32 col = 0; col < KMP_I_LOCK_CHUNK; ++col) {
  ------------------
  |  | 1222|  1.02k|#define KMP_I_LOCK_CHUNK 1024
  ------------------
  |  Branch (3448:32): [True: 1.02k, False: 1]
  ------------------
 3449|  1.02k|        kmp_indirect_lock_t *l = &ptr->table[row][col];
 3450|  1.02k|        if (l->lock) {
  ------------------
  |  Branch (3450:13): [True: 0, False: 1.02k]
  ------------------
 3451|       |          // Locks not destroyed explicitly need to be destroyed here.
 3452|      0|          KMP_I_LOCK_FUNC(l, destroy)(l->lock);
  ------------------
  |  | 1154|      0|  __kmp_indirect_##op[((kmp_indirect_lock_t *)(l))->type]
  ------------------
 3453|      0|          KA_TRACE(20, ("__kmp_cleanup_indirect_user_locks: destroy/freeing %p "
 3454|      0|                        "from table\n",
 3455|      0|                        l));
 3456|      0|          __kmp_free(l->lock);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3457|      0|        }
 3458|  1.02k|      }
 3459|      1|      __kmp_free(ptr->table[row]);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3460|      1|    }
 3461|      1|    kmp_indirect_lock_table_t *next_table = ptr->next_table;
 3462|      1|    if (ptr != &__kmp_i_lock_table)
  ------------------
  |  Branch (3462:9): [True: 0, False: 1]
  ------------------
 3463|      0|      __kmp_free(ptr);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3464|      1|    ptr = next_table;
 3465|      1|  }
 3466|       |
 3467|      1|  __kmp_init_user_locks = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 3468|      1|}
kmp_lock.cpp:_ZL40__kmp_acquire_ticket_lock_timed_templateP15kmp_ticket_locki:
  625|  12.3k|                                         kmp_int32 gtid) {
  626|  12.3k|  kmp_uint32 my_ticket = std::atomic_fetch_add_explicit(
  627|  12.3k|      &lck->lk.next_ticket, 1U, std::memory_order_relaxed);
  628|       |
  629|       |#ifdef USE_LOCK_PROFILE
  630|       |  if (std::atomic_load_explicit(&lck->lk.now_serving,
  631|       |                                std::memory_order_relaxed) != my_ticket)
  632|       |    __kmp_printf("LOCK CONTENTION: %p\n", lck);
  633|       |/* else __kmp_printf( "." );*/
  634|       |#endif /* USE_LOCK_PROFILE */
  635|       |
  636|  12.3k|  if (std::atomic_load_explicit(&lck->lk.now_serving,
  ------------------
  |  Branch (636:7): [True: 12.3k, False: 0]
  ------------------
  637|  12.3k|                                std::memory_order_acquire) == my_ticket) {
  638|  12.3k|    return KMP_LOCK_ACQUIRED_FIRST;
  ------------------
  |  |  158|  12.3k|#define KMP_LOCK_ACQUIRED_FIRST 1
  ------------------
  639|  12.3k|  }
  640|      0|  KMP_WAIT_PTR(&lck->lk.now_serving, my_ticket, __kmp_bakery_check, lck);
  ------------------
  |  | 1184|      0|#define KMP_WAIT_PTR __kmp_wait_4_ptr
  ------------------
  641|      0|  return KMP_LOCK_ACQUIRED_FIRST;
  ------------------
  |  |  158|      0|#define KMP_LOCK_ACQUIRED_FIRST 1
  ------------------
  642|  12.3k|}
kmp_lock.cpp:_ZL23__kmp_init_queuing_lockP13kmp_user_lock:
 2953|  6.16k|  static void __kmp_##op##_##lk##_##lock(kmp_user_lock_p lock) {               \
 2954|  6.16k|    __kmp_##op##_##lk##_##lock(&lock->lk);                                     \
 2955|  6.16k|  }
kmp_lock.cpp:_ZL24__kmp_init_indirect_lockPj18kmp_dyna_lockseq_t:
 3220|  6.16k|                                     kmp_dyna_lockseq_t seq) {
 3221|  6.16k|#if KMP_USE_ADAPTIVE_LOCKS
 3222|  6.16k|  if (seq == lockseq_adaptive && !__kmp_cpuinfo.flags.rtm) {
  ------------------
  |  Branch (3222:7): [True: 0, False: 6.16k]
  |  Branch (3222:34): [True: 0, False: 0]
  ------------------
 3223|      0|    KMP_WARNING(AdaptiveNotSupported, "kmp_lockseq_t", "adaptive");
  ------------------
  |  |  145|      0|  __kmp_msg(kmp_ms_warning, KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
 3224|      0|    seq = lockseq_queuing;
 3225|      0|  }
 3226|  6.16k|#endif
 3227|  6.16k|#if KMP_USE_TSX
 3228|  6.16k|  if (seq == lockseq_rtm_queuing && !__kmp_cpuinfo.flags.rtm) {
  ------------------
  |  Branch (3228:7): [True: 0, False: 6.16k]
  |  Branch (3228:37): [True: 0, False: 0]
  ------------------
 3229|      0|    seq = lockseq_queuing;
 3230|      0|  }
 3231|  6.16k|#endif
 3232|  6.16k|  kmp_indirect_locktag_t tag = KMP_GET_I_TAG(seq);
  ------------------
  |  | 1107|  6.16k|#define KMP_GET_I_TAG(seq) (kmp_indirect_locktag_t)((seq)-KMP_FIRST_I_LOCK)
  |  |  ------------------
  |  |  |  | 1078|  6.16k|#define KMP_FIRST_I_LOCK lockseq_ticket
  |  |  ------------------
  ------------------
 3233|  6.16k|  kmp_indirect_lock_t *l =
 3234|  6.16k|      __kmp_allocate_indirect_lock((void **)lock, __kmp_entry_gtid(), tag);
  ------------------
  |  | 3467|  6.16k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 3235|  6.16k|  KMP_I_LOCK_FUNC(l, init)(l->lock);
  ------------------
  |  | 1154|  6.16k|  __kmp_indirect_##op[((kmp_indirect_lock_t *)(l))->type]
  ------------------
 3236|  6.16k|  KA_TRACE(
 3237|  6.16k|      20, ("__kmp_init_indirect_lock: initialized indirect lock with type#%d\n",
 3238|  6.16k|           seq));
 3239|  6.16k|}
kmp_lock.cpp:_ZL26__kmp_lookup_indirect_lockPPvPKc:
 3194|  6.16k|__kmp_lookup_indirect_lock(void **user_lock, const char *func) {
 3195|  6.16k|  if (__kmp_env_consistency_check) {
  ------------------
  |  Branch (3195:7): [True: 0, False: 6.16k]
  ------------------
 3196|      0|    kmp_indirect_lock_t *lck = NULL;
 3197|      0|    if (user_lock == NULL) {
  ------------------
  |  Branch (3197:9): [True: 0, False: 0]
  ------------------
 3198|      0|      KMP_FATAL(LockIsUninitialized, func);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
 3199|      0|    }
 3200|      0|    if (OMP_LOCK_T_SIZE < sizeof(void *)) {
  ------------------
  |  |   54|      0|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3200:9): [True: 0, Folded]
  ------------------
 3201|      0|      kmp_lock_index_t idx = KMP_EXTRACT_I_INDEX(user_lock);
  ------------------
  |  | 1145|      0|#define KMP_EXTRACT_I_INDEX(l) (*(kmp_lock_index_t *)(l) >> 1)
  ------------------
 3202|      0|      lck = __kmp_get_i_lock(idx);
 3203|      0|    } else {
 3204|      0|      lck = *((kmp_indirect_lock_t **)user_lock);
 3205|      0|    }
 3206|      0|    if (lck == NULL) {
  ------------------
  |  Branch (3206:9): [True: 0, False: 0]
  ------------------
 3207|      0|      KMP_FATAL(LockIsUninitialized, func);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
 3208|      0|    }
 3209|      0|    return lck;
 3210|  6.16k|  } else {
 3211|  6.16k|    if (OMP_LOCK_T_SIZE < sizeof(void *)) {
  ------------------
  |  |   54|  6.16k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3211:9): [True: 6.16k, Folded]
  ------------------
 3212|  6.16k|      return __kmp_get_i_lock(KMP_EXTRACT_I_INDEX(user_lock));
  ------------------
  |  | 1145|  6.16k|#define KMP_EXTRACT_I_INDEX(l) (*(kmp_lock_index_t *)(l) >> 1)
  ------------------
 3213|  6.16k|    } else {
 3214|      0|      return *((kmp_indirect_lock_t **)user_lock);
 3215|      0|    }
 3216|  6.16k|  }
 3217|  6.16k|}
kmp_lock.cpp:_ZL27__kmp_destroy_indirect_lockPj:
 3241|  6.16k|static void __kmp_destroy_indirect_lock(kmp_dyna_lock_t *lock) {
 3242|  6.16k|  kmp_uint32 gtid = __kmp_entry_gtid();
  ------------------
  |  | 3467|  6.16k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 3243|  6.16k|  kmp_indirect_lock_t *l =
 3244|  6.16k|      __kmp_lookup_indirect_lock((void **)lock, "omp_destroy_lock");
 3245|  6.16k|  KMP_I_LOCK_FUNC(l, destroy)(l->lock);
  ------------------
  |  | 1154|  6.16k|  __kmp_indirect_##op[((kmp_indirect_lock_t *)(l))->type]
  ------------------
 3246|  6.16k|  kmp_indirect_locktag_t tag = l->type;
 3247|       |
 3248|  6.16k|  __kmp_acquire_lock(&__kmp_global_lock, gtid);
 3249|       |
 3250|       |  // Use the base lock's space to keep the pool chain.
 3251|  6.16k|  l->lock->pool.next = (kmp_user_lock_p)__kmp_indirect_lock_pool[tag];
 3252|  6.16k|  if (OMP_LOCK_T_SIZE < sizeof(void *)) {
  ------------------
  |  |   54|  6.16k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3252:7): [True: 6.16k, Folded]
  ------------------
 3253|  6.16k|    l->lock->pool.index = KMP_EXTRACT_I_INDEX(lock);
  ------------------
  |  | 1145|  6.16k|#define KMP_EXTRACT_I_INDEX(l) (*(kmp_lock_index_t *)(l) >> 1)
  ------------------
 3254|  6.16k|  }
 3255|  6.16k|  __kmp_indirect_lock_pool[tag] = l;
 3256|       |
 3257|  6.16k|  __kmp_release_lock(&__kmp_global_lock, gtid);
 3258|  6.16k|}
kmp_lock.cpp:_ZL26__kmp_destroy_queuing_lockP13kmp_user_lock:
 2953|  6.16k|  static void __kmp_##op##_##lk##_##lock(kmp_user_lock_p lock) {               \
 2954|  6.16k|    __kmp_##op##_##lk##_##lock(&lock->lk);                                     \
 2955|  6.16k|  }

kmp_i18n.cpp:_ZL28__kmp_acquire_bootstrap_lockP15kmp_ticket_lock:
  519|      1|static inline int __kmp_acquire_bootstrap_lock(kmp_bootstrap_lock_t *lck) {
  520|      1|  return __kmp_acquire_ticket_lock(lck, KMP_GTID_DNE);
  ------------------
  |  |   34|      1|#define KMP_GTID_DNE (-2)
  ------------------
  521|      1|}
kmp_i18n.cpp:_ZL28__kmp_release_bootstrap_lockP15kmp_ticket_lock:
  527|      1|static inline void __kmp_release_bootstrap_lock(kmp_bootstrap_lock_t *lck) {
  528|      1|  __kmp_release_ticket_lock(lck, KMP_GTID_DNE);
  ------------------
  |  |   34|      1|#define KMP_GTID_DNE (-2)
  ------------------
  529|      1|}
kmp_runtime.cpp:_ZL28__kmp_acquire_bootstrap_lockP15kmp_ticket_lock:
  519|      5|static inline int __kmp_acquire_bootstrap_lock(kmp_bootstrap_lock_t *lck) {
  520|      5|  return __kmp_acquire_ticket_lock(lck, KMP_GTID_DNE);
  ------------------
  |  |   34|      5|#define KMP_GTID_DNE (-2)
  ------------------
  521|      5|}
kmp_runtime.cpp:_ZL28__kmp_release_bootstrap_lockP15kmp_ticket_lock:
  527|      5|static inline void __kmp_release_bootstrap_lock(kmp_bootstrap_lock_t *lck) {
  528|      5|  __kmp_release_ticket_lock(lck, KMP_GTID_DNE);
  ------------------
  |  |   34|      5|#define KMP_GTID_DNE (-2)
  ------------------
  529|      5|}
kmp_runtime.cpp:_ZL15__kmp_init_lockP15kmp_ticket_lock:
  563|      3|static inline void __kmp_init_lock(kmp_lock_t *lck) {
  564|      3|  __kmp_init_ticket_lock(lck);
  565|      3|}
kmp_runtime.cpp:_ZL25__kmp_init_bootstrap_lockP15kmp_ticket_lock:
  531|      3|static inline void __kmp_init_bootstrap_lock(kmp_bootstrap_lock_t *lck) {
  532|      3|  __kmp_init_ticket_lock(lck);
  533|      3|}
kmp_lock.cpp:_ZL18__kmp_acquire_lockP15kmp_ticket_locki:
  551|  12.3k|static inline int __kmp_acquire_lock(kmp_lock_t *lck, kmp_int32 gtid) {
  552|  12.3k|  return __kmp_acquire_ticket_lock(lck, gtid);
  553|  12.3k|}
kmp_lock.cpp:_ZL18__kmp_release_lockP15kmp_ticket_locki:
  559|  12.3k|static inline void __kmp_release_lock(kmp_lock_t *lck, kmp_int32 gtid) {
  560|  12.3k|  __kmp_release_ticket_lock(lck, gtid);
  561|  12.3k|}
kmp_lock.cpp:_ZL16__kmp_get_i_lockj:
 1240|  6.16k|static inline kmp_indirect_lock_t *__kmp_get_i_lock(kmp_lock_index_t idx) {
 1241|  6.16k|  kmp_indirect_lock_table_t *lock_table = &__kmp_i_lock_table;
 1242|  6.16k|  while (lock_table) {
  ------------------
  |  Branch (1242:10): [True: 6.16k, False: 0]
  ------------------
 1243|  6.16k|    kmp_lock_index_t max_locks = lock_table->nrow_ptrs * KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|  6.16k|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 1244|  6.16k|    if (idx < max_locks) {
  ------------------
  |  Branch (1244:9): [True: 6.16k, False: 0]
  ------------------
 1245|  6.16k|      kmp_lock_index_t row = idx / KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|  6.16k|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 1246|  6.16k|      kmp_lock_index_t col = idx % KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|  6.16k|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 1247|  6.16k|      if (!lock_table->table[row] || idx >= lock_table->next)
  ------------------
  |  Branch (1247:11): [True: 0, False: 6.16k]
  |  Branch (1247:38): [True: 0, False: 6.16k]
  ------------------
 1248|      0|        break;
 1249|  6.16k|      return &lock_table->table[row][col];
 1250|  6.16k|    }
 1251|      0|    idx -= max_locks;
 1252|      0|    lock_table = lock_table->next_table;
 1253|      0|  }
 1254|      0|  return nullptr;
 1255|  6.16k|}

__kmp_get_global_thread_id:
  117|      2|int __kmp_get_global_thread_id() {
  118|      2|  int i;
  119|      2|  kmp_info_t **other_threads;
  120|      2|  size_t stack_data;
  121|      2|  char *stack_addr;
  122|      2|  size_t stack_size;
  123|      2|  char *stack_base;
  124|       |
  125|      2|  KA_TRACE(
  126|      2|      1000,
  127|      2|      ("*** __kmp_get_global_thread_id: entering, nproc=%d  all_nproc=%d\n",
  128|      2|       __kmp_nth, __kmp_all_nth));
  129|       |
  130|       |  /* JPH - to handle the case where __kmpc_end(0) is called immediately prior to
  131|       |     a parallel region, made it return KMP_GTID_DNE to force serial_initialize
  132|       |     by caller. Had to handle KMP_GTID_DNE at all call-sites, or else guarantee
  133|       |     __kmp_init_gtid for this to work. */
  134|       |
  135|      2|  if (!TCR_4(__kmp_init_gtid))
  ------------------
  |  | 1127|      2|#define TCR_4(a) (a)
  ------------------
  |  Branch (135:7): [True: 0, False: 2]
  ------------------
  136|      0|    return KMP_GTID_DNE;
  ------------------
  |  | 1000|      0|#define KMP_GTID_DNE (-2) /* Does not exist */
  ------------------
  137|       |
  138|      2|#ifdef KMP_TDATA_GTID
  139|      2|  if (TCR_4(__kmp_gtid_mode) >= 3) {
  ------------------
  |  | 1127|      2|#define TCR_4(a) (a)
  ------------------
  |  Branch (139:7): [True: 2, False: 0]
  ------------------
  140|      2|    KA_TRACE(1000, ("*** __kmp_get_global_thread_id: using TDATA\n"));
  141|      2|    return __kmp_gtid;
  142|      2|  }
  143|      0|#endif
  144|      0|  if (TCR_4(__kmp_gtid_mode) >= 2) {
  ------------------
  |  | 1127|      0|#define TCR_4(a) (a)
  ------------------
  |  Branch (144:7): [True: 0, False: 0]
  ------------------
  145|      0|    KA_TRACE(1000, ("*** __kmp_get_global_thread_id: using keyed TLS\n"));
  146|      0|    return __kmp_gtid_get_specific();
  147|      0|  }
  148|      0|  KA_TRACE(1000, ("*** __kmp_get_global_thread_id: using internal alg.\n"));
  149|       |
  150|      0|  stack_addr = (char *)&stack_data;
  151|      0|  other_threads = __kmp_threads;
  152|       |
  153|       |  /* ATT: The code below is a source of potential bugs due to unsynchronized
  154|       |     access to __kmp_threads array. For example:
  155|       |     1. Current thread loads other_threads[i] to thr and checks it, it is
  156|       |        non-NULL.
  157|       |     2. Current thread is suspended by OS.
  158|       |     3. Another thread unregisters and finishes (debug versions of free()
  159|       |        may fill memory with something like 0xEF).
  160|       |     4. Current thread is resumed.
  161|       |     5. Current thread reads junk from *thr.
  162|       |     TODO: Fix it.  --ln  */
  163|       |
  164|      0|  for (i = 0; i < __kmp_threads_capacity; i++) {
  ------------------
  |  Branch (164:15): [True: 0, False: 0]
  ------------------
  165|       |
  166|      0|    kmp_info_t *thr = (kmp_info_t *)TCR_SYNC_PTR(other_threads[i]);
  ------------------
  |  | 1158|      0|#define TCR_SYNC_PTR(a) ((void *)TCR_SYNC_8(a))
  |  |  ------------------
  |  |  |  | 1140|      0|#define TCR_SYNC_8(a) (a)
  |  |  ------------------
  ------------------
  167|      0|    if (!thr)
  ------------------
  |  Branch (167:9): [True: 0, False: 0]
  ------------------
  168|      0|      continue;
  169|       |
  170|      0|    stack_size = (size_t)TCR_PTR(thr->th.th_info.ds.ds_stacksize);
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  171|      0|    stack_base = (char *)TCR_PTR(thr->th.th_info.ds.ds_stackbase);
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  172|       |
  173|       |    /* stack grows down -- search through all of the active threads */
  174|       |
  175|      0|    if (stack_addr <= stack_base) {
  ------------------
  |  Branch (175:9): [True: 0, False: 0]
  ------------------
  176|      0|      size_t stack_diff = stack_base - stack_addr;
  177|       |
  178|      0|      if (stack_diff <= stack_size) {
  ------------------
  |  Branch (178:11): [True: 0, False: 0]
  ------------------
  179|       |        /* The only way we can be closer than the allocated */
  180|       |        /* stack size is if we are running on this thread. */
  181|      0|        KMP_DEBUG_ASSERT(__kmp_gtid_get_specific() == i);
  182|      0|        return i;
  183|      0|      }
  184|      0|    }
  185|      0|  }
  186|       |
  187|       |  /* get specific to try and determine our gtid */
  188|      0|  KA_TRACE(1000,
  189|      0|           ("*** __kmp_get_global_thread_id: internal alg. failed to find "
  190|      0|            "thread, using TLS\n"));
  191|      0|  i = __kmp_gtid_get_specific();
  192|       |
  193|       |  /*fprintf( stderr, "=== %d\n", i );  */ /* GROO */
  194|       |
  195|       |  /* if we havn't been assigned a gtid, then return code */
  196|      0|  if (i < 0)
  ------------------
  |  Branch (196:7): [True: 0, False: 0]
  ------------------
  197|      0|    return i;
  198|       |
  199|       |  /* dynamically updated stack window for uber threads to avoid get_specific
  200|       |     call */
  201|      0|  if (!TCR_4(other_threads[i]->th.th_info.ds.ds_stackgrow)) {
  ------------------
  |  | 1127|      0|#define TCR_4(a) (a)
  ------------------
  |  Branch (201:7): [True: 0, False: 0]
  ------------------
  202|      0|    KMP_FATAL(StackOverflow, i);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  203|      0|  }
  204|       |
  205|      0|  stack_base = (char *)other_threads[i]->th.th_info.ds.ds_stackbase;
  206|      0|  if (stack_addr > stack_base) {
  ------------------
  |  Branch (206:7): [True: 0, False: 0]
  ------------------
  207|      0|    TCW_PTR(other_threads[i]->th.th_info.ds.ds_stackbase, stack_addr);
  ------------------
  |  | 1157|      0|#define TCW_PTR(a, b) TCW_8((a), (b))
  |  |  ------------------
  |  |  |  | 1132|      0|#define TCW_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
  208|      0|    TCW_PTR(other_threads[i]->th.th_info.ds.ds_stacksize,
  ------------------
  |  | 1157|      0|#define TCW_PTR(a, b) TCW_8((a), (b))
  |  |  ------------------
  |  |  |  | 1132|      0|#define TCW_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
  209|      0|            other_threads[i]->th.th_info.ds.ds_stacksize + stack_addr -
  210|      0|                stack_base);
  211|      0|  } else {
  212|      0|    TCW_PTR(other_threads[i]->th.th_info.ds.ds_stacksize,
  ------------------
  |  | 1157|      0|#define TCW_PTR(a, b) TCW_8((a), (b))
  |  |  ------------------
  |  |  |  | 1132|      0|#define TCW_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
  213|      0|            stack_base - stack_addr);
  214|      0|  }
  215|       |
  216|       |  /* Reprint stack bounds for ubermaster since they have been refined */
  217|      0|  if (__kmp_storage_map) {
  ------------------
  |  Branch (217:7): [True: 0, False: 0]
  ------------------
  218|      0|    char *stack_end = (char *)other_threads[i]->th.th_info.ds.ds_stackbase;
  219|      0|    char *stack_beg = stack_end - other_threads[i]->th.th_info.ds.ds_stacksize;
  220|      0|    __kmp_print_storage_map_gtid(i, stack_beg, stack_end,
  221|      0|                                 other_threads[i]->th.th_info.ds.ds_stacksize,
  222|      0|                                 "th_%d stack (refinement)", i);
  223|      0|  }
  224|      0|  return i;
  225|      0|}
__kmp_get_global_thread_id_reg:
  227|  24.6k|int __kmp_get_global_thread_id_reg() {
  228|  24.6k|  int gtid;
  229|       |
  230|  24.6k|  if (!__kmp_init_serial) {
  ------------------
  |  Branch (230:7): [True: 1, False: 24.6k]
  ------------------
  231|      1|    gtid = KMP_GTID_DNE;
  ------------------
  |  | 1000|      1|#define KMP_GTID_DNE (-2) /* Does not exist */
  ------------------
  232|      1|  } else
  233|  24.6k|#ifdef KMP_TDATA_GTID
  234|  24.6k|      if (TCR_4(__kmp_gtid_mode) >= 3) {
  ------------------
  |  | 1127|  24.6k|#define TCR_4(a) (a)
  ------------------
  |  Branch (234:11): [True: 24.6k, False: 0]
  ------------------
  235|  24.6k|    KA_TRACE(1000, ("*** __kmp_get_global_thread_id_reg: using TDATA\n"));
  236|  24.6k|    gtid = __kmp_gtid;
  237|  24.6k|  } else
  238|      0|#endif
  239|      0|      if (TCR_4(__kmp_gtid_mode) >= 2) {
  ------------------
  |  | 1127|      0|#define TCR_4(a) (a)
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|    KA_TRACE(1000, ("*** __kmp_get_global_thread_id_reg: using keyed TLS\n"));
  241|      0|    gtid = __kmp_gtid_get_specific();
  242|      0|  } else {
  243|      0|    KA_TRACE(1000,
  244|      0|             ("*** __kmp_get_global_thread_id_reg: using internal alg.\n"));
  245|      0|    gtid = __kmp_get_global_thread_id();
  246|      0|  }
  247|       |
  248|       |  /* we must be a new uber master sibling thread */
  249|  24.6k|  if (gtid == KMP_GTID_DNE) {
  ------------------
  |  | 1000|  24.6k|#define KMP_GTID_DNE (-2) /* Does not exist */
  ------------------
  |  Branch (249:7): [True: 1, False: 24.6k]
  ------------------
  250|      1|    KA_TRACE(10,
  251|      1|             ("__kmp_get_global_thread_id_reg: Encountered new root thread. "
  252|      1|              "Registering a new gtid.\n"));
  253|      1|    __kmp_acquire_bootstrap_lock(&__kmp_initz_lock);
  254|      1|    if (!__kmp_init_serial) {
  ------------------
  |  Branch (254:9): [True: 1, False: 0]
  ------------------
  255|      1|      __kmp_do_serial_initialize();
  256|      1|      gtid = __kmp_gtid_get_specific();
  257|      1|    } else {
  258|      0|      gtid = __kmp_register_root(FALSE);
  ------------------
  |  | 1279|      0|#define FALSE 0
  ------------------
  259|      0|    }
  260|      1|    __kmp_release_bootstrap_lock(&__kmp_initz_lock);
  261|       |    /*__kmp_printf( "+++ %d\n", gtid ); */ /* GROO */
  262|      1|  }
  263|       |
  264|  24.6k|  KMP_DEBUG_ASSERT(gtid >= 0);
  265|       |
  266|  24.6k|  return gtid;
  267|  24.6k|}
__kmp_check_stack_overlap:
  270|      1|void __kmp_check_stack_overlap(kmp_info_t *th) {
  271|      1|  int f;
  272|      1|  char *stack_beg = NULL;
  273|      1|  char *stack_end = NULL;
  274|      1|  int gtid;
  275|       |
  276|      1|  KA_TRACE(10, ("__kmp_check_stack_overlap: called\n"));
  277|      1|  if (__kmp_storage_map) {
  ------------------
  |  Branch (277:7): [True: 0, False: 1]
  ------------------
  278|      0|    stack_end = (char *)th->th.th_info.ds.ds_stackbase;
  279|      0|    stack_beg = stack_end - th->th.th_info.ds.ds_stacksize;
  280|       |
  281|      0|    gtid = __kmp_gtid_from_thread(th);
  282|       |
  283|      0|    if (gtid == KMP_GTID_MONITOR) {
  ------------------
  |  | 1002|      0|#define KMP_GTID_MONITOR (-4) /* Monitor thread ID */
  ------------------
  |  Branch (283:9): [True: 0, False: 0]
  ------------------
  284|      0|      __kmp_print_storage_map_gtid(
  285|      0|          gtid, stack_beg, stack_end, th->th.th_info.ds.ds_stacksize,
  286|      0|          "th_%s stack (%s)", "mon",
  287|      0|          (th->th.th_info.ds.ds_stackgrow) ? "initial" : "actual");
  ------------------
  |  Branch (287:11): [True: 0, False: 0]
  ------------------
  288|      0|    } else {
  289|      0|      __kmp_print_storage_map_gtid(
  290|      0|          gtid, stack_beg, stack_end, th->th.th_info.ds.ds_stacksize,
  291|      0|          "th_%d stack (%s)", gtid,
  292|      0|          (th->th.th_info.ds.ds_stackgrow) ? "initial" : "actual");
  ------------------
  |  Branch (292:11): [True: 0, False: 0]
  ------------------
  293|      0|    }
  294|      0|  }
  295|       |
  296|       |  /* No point in checking ubermaster threads since they use refinement and
  297|       |   * cannot overlap */
  298|      1|  gtid = __kmp_gtid_from_thread(th);
  299|      1|  if (__kmp_env_checks == TRUE && !KMP_UBER_GTID(gtid)) {
  ------------------
  |  | 1280|      2|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
  |  Branch (299:7): [True: 0, False: 1]
  |  Branch (299:35): [True: 0, False: 0]
  ------------------
  300|      0|    KA_TRACE(10,
  301|      0|             ("__kmp_check_stack_overlap: performing extensive checking\n"));
  302|      0|    if (stack_beg == NULL) {
  ------------------
  |  Branch (302:9): [True: 0, False: 0]
  ------------------
  303|      0|      stack_end = (char *)th->th.th_info.ds.ds_stackbase;
  304|      0|      stack_beg = stack_end - th->th.th_info.ds.ds_stacksize;
  305|      0|    }
  306|       |
  307|      0|    for (f = 0; f < __kmp_threads_capacity; f++) {
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  ------------------
  308|      0|      kmp_info_t *f_th = (kmp_info_t *)TCR_SYNC_PTR(__kmp_threads[f]);
  ------------------
  |  | 1158|      0|#define TCR_SYNC_PTR(a) ((void *)TCR_SYNC_8(a))
  |  |  ------------------
  |  |  |  | 1140|      0|#define TCR_SYNC_8(a) (a)
  |  |  ------------------
  ------------------
  309|       |
  310|      0|      if (f_th && f_th != th) {
  ------------------
  |  Branch (310:11): [True: 0, False: 0]
  |  Branch (310:19): [True: 0, False: 0]
  ------------------
  311|      0|        char *other_stack_end =
  312|      0|            (char *)TCR_PTR(f_th->th.th_info.ds.ds_stackbase);
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  313|      0|        char *other_stack_beg =
  314|      0|            other_stack_end - (size_t)TCR_PTR(f_th->th.th_info.ds.ds_stacksize);
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  315|      0|        if ((stack_beg > other_stack_beg && stack_beg < other_stack_end) ||
  ------------------
  |  Branch (315:14): [True: 0, False: 0]
  |  Branch (315:45): [True: 0, False: 0]
  ------------------
  316|      0|            (stack_end > other_stack_beg && stack_end < other_stack_end)) {
  ------------------
  |  Branch (316:14): [True: 0, False: 0]
  |  Branch (316:45): [True: 0, False: 0]
  ------------------
  317|       |
  318|       |          /* Print the other stack values before the abort */
  319|      0|          if (__kmp_storage_map)
  ------------------
  |  Branch (319:15): [True: 0, False: 0]
  ------------------
  320|      0|            __kmp_print_storage_map_gtid(
  321|      0|                -1, other_stack_beg, other_stack_end,
  322|      0|                (size_t)TCR_PTR(f_th->th.th_info.ds.ds_stacksize),
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  323|      0|                "th_%d stack (overlapped)", __kmp_gtid_from_thread(f_th));
  324|       |
  325|      0|          __kmp_fatal(KMP_MSG(StackOverlap), KMP_HNT(ChangeStackLimit),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                        __kmp_fatal(KMP_MSG(StackOverlap), KMP_HNT(ChangeStackLimit),
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  326|      0|                      __kmp_msg_null);
  327|      0|        }
  328|      0|      }
  329|      0|    }
  330|      0|  }
  331|      1|  KA_TRACE(10, ("__kmp_check_stack_overlap: returning\n"));
  332|      1|}
__kmp_get_schedule_global:
 3134|      3|kmp_r_sched_t __kmp_get_schedule_global() {
 3135|       |  // This routine created because pairs (__kmp_sched, __kmp_chunk) and
 3136|       |  // (__kmp_static, __kmp_guided) may be changed by kmp_set_defaults
 3137|       |  // independently. So one can get the updated schedule here.
 3138|       |
 3139|      3|  kmp_r_sched_t r_sched;
 3140|       |
 3141|       |  // create schedule from 4 globals: __kmp_sched, __kmp_chunk, __kmp_static,
 3142|       |  // __kmp_guided. __kmp_sched should keep original value, so that user can set
 3143|       |  // KMP_SCHEDULE multiple times, and thus have different run-time schedules in
 3144|       |  // different roots (even in OMP 2.5)
 3145|      3|  enum sched_type s = SCHEDULE_WITHOUT_MODIFIERS(__kmp_sched);
  ------------------
  |  |  451|      3|  (enum sched_type)(                                                           \
  |  |  452|      3|      (s) & ~(kmp_sch_modifier_nonmonotonic | kmp_sch_modifier_monotonic))
  ------------------
 3146|      3|  enum sched_type sched_modifiers = SCHEDULE_GET_MODIFIERS(__kmp_sched);
  ------------------
  |  |  458|      3|  ((enum sched_type)(                                                          \
  |  |  459|      3|      (s) & (kmp_sch_modifier_nonmonotonic | kmp_sch_modifier_monotonic)))
  ------------------
 3147|      3|  if (s == kmp_sch_static) {
  ------------------
  |  Branch (3147:7): [True: 3, False: 0]
  ------------------
 3148|       |    // replace STATIC with more detailed schedule (balanced or greedy)
 3149|      3|    r_sched.r_sched_type = __kmp_static;
 3150|      3|  } else if (s == kmp_sch_guided_chunked) {
  ------------------
  |  Branch (3150:14): [True: 0, False: 0]
  ------------------
 3151|       |    // replace GUIDED with more detailed schedule (iterative or analytical)
 3152|      0|    r_sched.r_sched_type = __kmp_guided;
 3153|      0|  } else { // (STATIC_CHUNKED), or (DYNAMIC_CHUNKED), or other
 3154|      0|    r_sched.r_sched_type = __kmp_sched;
 3155|      0|  }
 3156|      3|  SCHEDULE_SET_MODIFIERS(r_sched.r_sched_type, sched_modifiers);
  ------------------
  |  |  461|      3|  (s = (enum sched_type)((kmp_int32)s | (kmp_int32)m))
  ------------------
 3157|       |
 3158|      3|  if (__kmp_chunk < KMP_DEFAULT_CHUNK) {
  ------------------
  |  | 1244|      3|#define KMP_DEFAULT_CHUNK 1
  ------------------
  |  Branch (3158:7): [True: 3, False: 0]
  ------------------
 3159|       |    // __kmp_chunk may be wrong here (if it was not ever set)
 3160|      3|    r_sched.chunk = KMP_DEFAULT_CHUNK;
  ------------------
  |  | 1244|      3|#define KMP_DEFAULT_CHUNK 1
  ------------------
 3161|      3|  } else {
 3162|      0|    r_sched.chunk = __kmp_chunk;
 3163|      0|  }
 3164|       |
 3165|      3|  return r_sched;
 3166|      3|}
__kmp_init_random:
 3634|      1|void __kmp_init_random(kmp_info_t *thread) {
 3635|      1|  unsigned seed = thread->th.th_info.ds.ds_tid;
 3636|       |
 3637|      1|  thread->th.th_a =
 3638|      1|      __kmp_primes[seed % (sizeof(__kmp_primes) / sizeof(__kmp_primes[0]))];
 3639|      1|  thread->th.th_x = (seed + 1) * thread->th.th_a + 1;
 3640|      1|  KA_TRACE(30,
 3641|      1|           ("__kmp_init_random: THREAD: %u; A: %u\n", seed, thread->th.th_a));
 3642|      1|}
__kmp_register_root:
 3774|      1|int __kmp_register_root(int initial_thread) {
 3775|      1|  kmp_info_t *root_thread;
 3776|      1|  kmp_root_t *root;
 3777|      1|  int gtid;
 3778|      1|  int capacity;
 3779|      1|  __kmp_acquire_bootstrap_lock(&__kmp_forkjoin_lock);
 3780|      1|  KA_TRACE(20, ("__kmp_register_root: entered\n"));
 3781|      1|  KMP_MB();
 3782|       |
 3783|       |  /* 2007-03-02:
 3784|       |     If initial thread did not invoke OpenMP RTL yet, and this thread is not an
 3785|       |     initial one, "__kmp_all_nth >= __kmp_threads_capacity" condition does not
 3786|       |     work as expected -- it may return false (that means there is at least one
 3787|       |     empty slot in __kmp_threads array), but it is possible the only free slot
 3788|       |     is #0, which is reserved for initial thread and so cannot be used for this
 3789|       |     one. Following code workarounds this bug.
 3790|       |
 3791|       |     However, right solution seems to be not reserving slot #0 for initial
 3792|       |     thread because:
 3793|       |     (1) there is no magic in slot #0,
 3794|       |     (2) we cannot detect initial thread reliably (the first thread which does
 3795|       |        serial initialization may be not a real initial thread).
 3796|       |  */
 3797|      1|  capacity = __kmp_threads_capacity;
 3798|      1|  if (!initial_thread && TCR_PTR(__kmp_threads[0]) == NULL) {
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  |  Branch (3798:7): [True: 0, False: 1]
  |  Branch (3798:26): [True: 0, False: 0]
  ------------------
 3799|      0|    --capacity;
 3800|      0|  }
 3801|       |
 3802|       |  // If it is not for initializing the hidden helper team, we need to take
 3803|       |  // __kmp_hidden_helper_threads_num out of the capacity because it is included
 3804|       |  // in __kmp_threads_capacity.
 3805|      1|  if (__kmp_enable_hidden_helper && !TCR_4(__kmp_init_hidden_helper_threads)) {
  ------------------
  |  | 1127|      1|#define TCR_4(a) (a)
  ------------------
  |  Branch (3805:7): [True: 1, False: 0]
  |  Branch (3805:37): [True: 1, False: 0]
  ------------------
 3806|      1|    capacity -= __kmp_hidden_helper_threads_num;
 3807|      1|  }
 3808|       |
 3809|       |  /* see if there are too many threads */
 3810|      1|  if (__kmp_all_nth >= capacity && !__kmp_expand_threads(1)) {
  ------------------
  |  Branch (3810:7): [True: 0, False: 1]
  |  Branch (3810:36): [True: 0, False: 0]
  ------------------
 3811|      0|    if (__kmp_tp_cached) {
  ------------------
  |  Branch (3811:9): [True: 0, False: 0]
  ------------------
 3812|      0|      __kmp_fatal(KMP_MSG(CantRegisterNewThread),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
 3813|      0|                  KMP_HNT(Set_ALL_THREADPRIVATE, __kmp_tp_capacity),
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
 3814|      0|                  KMP_HNT(PossibleSystemLimitOnThreads), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
 3815|      0|    } else {
 3816|      0|      __kmp_fatal(KMP_MSG(CantRegisterNewThread), KMP_HNT(SystemLimitOnThreads),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                    __kmp_fatal(KMP_MSG(CantRegisterNewThread), KMP_HNT(SystemLimitOnThreads),
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
 3817|      0|                  __kmp_msg_null);
 3818|      0|    }
 3819|      0|  }
 3820|       |
 3821|       |  // When hidden helper task is enabled, __kmp_threads is organized as follows:
 3822|       |  // 0: initial thread, also a regular OpenMP thread.
 3823|       |  // [1, __kmp_hidden_helper_threads_num]: slots for hidden helper threads.
 3824|       |  // [__kmp_hidden_helper_threads_num + 1, __kmp_threads_capacity): slots for
 3825|       |  // regular OpenMP threads.
 3826|      1|  if (TCR_4(__kmp_init_hidden_helper_threads)) {
  ------------------
  |  | 1127|      1|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 3827|       |    // Find an available thread slot for hidden helper thread. Slots for hidden
 3828|       |    // helper threads start from 1 to __kmp_hidden_helper_threads_num.
 3829|      0|    for (gtid = 1; TCR_PTR(__kmp_threads[gtid]) != NULL &&
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  |  Branch (3829:20): [True: 0, False: 0]
  ------------------
 3830|      0|                   gtid <= __kmp_hidden_helper_threads_num;
  ------------------
  |  Branch (3830:20): [True: 0, False: 0]
  ------------------
 3831|      0|         gtid++)
 3832|      0|      ;
 3833|      0|    KMP_ASSERT(gtid <= __kmp_hidden_helper_threads_num);
  ------------------
  |  |   50|      0|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 3834|      0|    KA_TRACE(1, ("__kmp_register_root: found slot in threads array for "
 3835|      0|                 "hidden helper thread: T#%d\n",
 3836|      0|                 gtid));
 3837|      1|  } else {
 3838|       |    /* find an available thread slot */
 3839|       |    // Don't reassign the zero slot since we need that to only be used by
 3840|       |    // initial thread. Slots for hidden helper threads should also be skipped.
 3841|      1|    if (initial_thread && TCR_PTR(__kmp_threads[0]) == NULL) {
  ------------------
  |  | 1156|      1|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      1|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  |  Branch (3841:9): [True: 1, False: 0]
  |  Branch (3841:27): [True: 1, False: 0]
  ------------------
 3842|      1|      gtid = 0;
 3843|      1|    } else {
 3844|      0|      for (gtid = __kmp_hidden_helper_threads_num + 1;
 3845|      0|           TCR_PTR(__kmp_threads[gtid]) != NULL; gtid++)
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  |  Branch (3845:12): [True: 0, False: 0]
  ------------------
 3846|      0|        ;
 3847|      0|    }
 3848|      1|    KA_TRACE(
 3849|      1|        1, ("__kmp_register_root: found slot in threads array: T#%d\n", gtid));
 3850|      1|    KMP_ASSERT(gtid < __kmp_threads_capacity);
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 3851|      1|  }
 3852|       |
 3853|       |  /* update global accounting */
 3854|      1|  __kmp_all_nth++;
 3855|      1|  TCW_4(__kmp_nth, __kmp_nth + 1);
  ------------------
  |  | 1128|      1|#define TCW_4(a, b) (a) = (b)
  ------------------
 3856|       |
 3857|       |  // if __kmp_adjust_gtid_mode is set, then we use method #1 (sp search) for low
 3858|       |  // numbers of procs, and method #2 (keyed API call) for higher numbers.
 3859|      1|  if (__kmp_adjust_gtid_mode) {
  ------------------
  |  Branch (3859:7): [True: 0, False: 1]
  ------------------
 3860|      0|    if (__kmp_all_nth >= __kmp_tls_gtid_min) {
  ------------------
  |  Branch (3860:9): [True: 0, False: 0]
  ------------------
 3861|      0|      if (TCR_4(__kmp_gtid_mode) != 2) {
  ------------------
  |  | 1127|      0|#define TCR_4(a) (a)
  ------------------
  |  Branch (3861:11): [True: 0, False: 0]
  ------------------
 3862|      0|        TCW_4(__kmp_gtid_mode, 2);
  ------------------
  |  | 1128|      0|#define TCW_4(a, b) (a) = (b)
  ------------------
 3863|      0|      }
 3864|      0|    } else {
 3865|      0|      if (TCR_4(__kmp_gtid_mode) != 1) {
  ------------------
  |  | 1127|      0|#define TCR_4(a) (a)
  ------------------
  |  Branch (3865:11): [True: 0, False: 0]
  ------------------
 3866|      0|        TCW_4(__kmp_gtid_mode, 1);
  ------------------
  |  | 1128|      0|#define TCW_4(a, b) (a) = (b)
  ------------------
 3867|      0|      }
 3868|      0|    }
 3869|      0|  }
 3870|       |
 3871|      1|#ifdef KMP_ADJUST_BLOCKTIME
 3872|       |  /* Adjust blocktime to zero if necessary            */
 3873|       |  /* Middle initialization might not have occurred yet */
 3874|      1|  if (!__kmp_env_blocktime && (__kmp_avail_proc > 0)) {
  ------------------
  |  Branch (3874:7): [True: 1, False: 0]
  |  Branch (3874:31): [True: 0, False: 1]
  ------------------
 3875|      0|    if (__kmp_nth > __kmp_avail_proc) {
  ------------------
  |  Branch (3875:9): [True: 0, False: 0]
  ------------------
 3876|      0|      __kmp_zero_bt = TRUE;
  ------------------
  |  | 1280|      0|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      0|#define FALSE 0
  |  |  ------------------
  ------------------
 3877|      0|    }
 3878|      0|  }
 3879|      1|#endif /* KMP_ADJUST_BLOCKTIME */
 3880|       |
 3881|       |  /* setup this new hierarchy */
 3882|      1|  if (!(root = __kmp_root[gtid])) {
  ------------------
  |  Branch (3882:7): [True: 1, False: 0]
  ------------------
 3883|      1|    root = __kmp_root[gtid] = (kmp_root_t *)__kmp_allocate(sizeof(kmp_root_t));
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3884|      1|    KMP_DEBUG_ASSERT(!root->r.r_root_team);
 3885|      1|  }
 3886|       |
 3887|       |#if KMP_STATS_ENABLED
 3888|       |  // Initialize stats as soon as possible (right after gtid assignment).
 3889|       |  __kmp_stats_thread_ptr = __kmp_stats_list->push_back(gtid);
 3890|       |  __kmp_stats_thread_ptr->startLife();
 3891|       |  KMP_SET_THREAD_STATE(SERIAL_REGION);
 3892|       |  KMP_INIT_PARTITIONED_TIMERS(OMP_serial);
 3893|       |#endif
 3894|      1|  __kmp_initialize_root(root);
 3895|       |
 3896|       |  /* setup new root thread structure */
 3897|      1|  if (root->r.r_uber_thread) {
  ------------------
  |  Branch (3897:7): [True: 0, False: 1]
  ------------------
 3898|      0|    root_thread = root->r.r_uber_thread;
 3899|      1|  } else {
 3900|      1|    root_thread = (kmp_info_t *)__kmp_allocate(sizeof(kmp_info_t));
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3901|      1|    if (__kmp_storage_map) {
  ------------------
  |  Branch (3901:9): [True: 0, False: 1]
  ------------------
 3902|      0|      __kmp_print_thread_storage_map(root_thread, gtid);
 3903|      0|    }
 3904|      1|    root_thread->th.th_info.ds.ds_gtid = gtid;
 3905|      1|#if OMPT_SUPPORT
 3906|      1|    root_thread->th.ompt_thread_info.thread_data = ompt_data_none;
  ------------------
  |  | 1408|      1|#define ompt_data_none {0}
  ------------------
 3907|      1|#endif
 3908|      1|    root_thread->th.th_root = root;
 3909|      1|    if (__kmp_env_consistency_check) {
  ------------------
  |  Branch (3909:9): [True: 0, False: 1]
  ------------------
 3910|      0|      root_thread->th.th_cons = __kmp_allocate_cons_stack(gtid);
 3911|      0|    }
 3912|      1|#if USE_FAST_MEMORY
 3913|      1|    __kmp_initialize_fast_memory(root_thread);
 3914|      1|#endif /* USE_FAST_MEMORY */
 3915|       |
 3916|      1|#if KMP_USE_BGET
 3917|      1|    KMP_DEBUG_ASSERT(root_thread->th.th_local.bget_data == NULL);
 3918|      1|    __kmp_initialize_bget(root_thread);
 3919|      1|#endif
 3920|      1|    __kmp_init_random(root_thread); // Initialize random number generator
 3921|      1|  }
 3922|       |
 3923|       |  /* setup the serial team held in reserve by the root thread */
 3924|      1|  if (!root_thread->th.th_serial_team) {
  ------------------
  |  Branch (3924:7): [True: 1, False: 0]
  ------------------
 3925|      1|    kmp_internal_control_t r_icvs = __kmp_get_global_icvs();
 3926|      1|    KF_TRACE(10, ("__kmp_register_root: before serial_team\n"));
 3927|      1|    root_thread->th.th_serial_team = __kmp_allocate_team(
 3928|      1|        root, 1, 1,
 3929|      1|#if OMPT_SUPPORT
 3930|      1|        ompt_data_none, // root parallel id
  ------------------
  |  | 1408|      1|#define ompt_data_none {0}
  ------------------
 3931|      1|#endif
 3932|      1|        proc_bind_default, &r_icvs, 0 USE_NESTED_HOT_ARG(NULL));
  ------------------
  |  |  165|      1|#define USE_NESTED_HOT_ARG(x) , x
  ------------------
 3933|      1|  }
 3934|      1|  KMP_ASSERT(root_thread->th.th_serial_team);
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 3935|      1|  KF_TRACE(10, ("__kmp_register_root: after serial_team = %p\n",
 3936|      1|                root_thread->th.th_serial_team));
 3937|       |
 3938|       |  /* drop root_thread into place */
 3939|      1|  TCW_SYNC_PTR(__kmp_threads[gtid], root_thread);
  ------------------
  |  | 1159|      1|#define TCW_SYNC_PTR(a, b) TCW_SYNC_8((a), (b))
  |  |  ------------------
  |  |  |  | 1141|      1|#define TCW_SYNC_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
 3940|       |
 3941|      1|  root->r.r_root_team->t.t_threads[0] = root_thread;
 3942|      1|  root->r.r_hot_team->t.t_threads[0] = root_thread;
 3943|      1|  root_thread->th.th_serial_team->t.t_threads[0] = root_thread;
 3944|       |  // AC: the team created in reserve, not for execution (it is unused for now).
 3945|      1|  root_thread->th.th_serial_team->t.t_serialized = 0;
 3946|      1|  root->r.r_uber_thread = root_thread;
 3947|       |
 3948|       |  /* initialize the thread, get it ready to go */
 3949|      1|  __kmp_initialize_info(root_thread, root->r.r_root_team, 0, gtid);
 3950|      1|  TCW_4(__kmp_init_gtid, TRUE);
  ------------------
  |  | 1128|      1|#define TCW_4(a, b) (a) = (b)
  ------------------
 3951|       |
 3952|       |  /* prepare the primary thread for get_gtid() */
 3953|      1|  __kmp_gtid_set_specific(gtid);
 3954|       |
 3955|       |#if USE_ITT_BUILD
 3956|       |  __kmp_itt_thread_name(gtid);
 3957|       |#endif /* USE_ITT_BUILD */
 3958|       |
 3959|      1|#ifdef KMP_TDATA_GTID
 3960|      1|  __kmp_gtid = gtid;
 3961|      1|#endif
 3962|      1|  __kmp_create_worker(gtid, root_thread, __kmp_stksize);
 3963|      1|  KMP_DEBUG_ASSERT(__kmp_gtid_get_specific() == gtid);
 3964|       |
 3965|      1|  KA_TRACE(20, ("__kmp_register_root: T#%d init T#%d(%d:%d) arrived: join=%u, "
 3966|      1|                "plain=%u\n",
 3967|      1|                gtid, __kmp_gtid_from_tid(0, root->r.r_hot_team),
 3968|      1|                root->r.r_hot_team->t.t_id, 0, KMP_INIT_BARRIER_STATE,
 3969|      1|                KMP_INIT_BARRIER_STATE));
 3970|      1|  { // Initialize barrier data.
 3971|      1|    int b;
 3972|      4|    for (b = 0; b < bs_last_barrier; ++b) {
  ------------------
  |  Branch (3972:17): [True: 3, False: 1]
  ------------------
 3973|      3|      root_thread->th.th_bar[b].bb.b_arrived = KMP_INIT_BARRIER_STATE;
  ------------------
  |  | 2018|      3|#define KMP_INIT_BARRIER_STATE 0 /* should probably start from zero */
  ------------------
 3974|       |#if USE_DEBUGGER
 3975|       |      root_thread->th.th_bar[b].bb.b_worker_arrived = 0;
 3976|       |#endif
 3977|      3|    }
 3978|      1|  }
 3979|      1|  KMP_DEBUG_ASSERT(root->r.r_hot_team->t.t_bar[bs_forkjoin_barrier].b_arrived ==
 3980|      1|                   KMP_INIT_BARRIER_STATE);
 3981|       |
 3982|      1|#if KMP_AFFINITY_SUPPORTED
 3983|      1|  root_thread->th.th_current_place = KMP_PLACE_UNDEFINED;
  ------------------
  |  |  960|      1|#define KMP_PLACE_UNDEFINED (-2)
  ------------------
 3984|      1|  root_thread->th.th_new_place = KMP_PLACE_UNDEFINED;
  ------------------
  |  |  960|      1|#define KMP_PLACE_UNDEFINED (-2)
  ------------------
 3985|      1|  root_thread->th.th_first_place = KMP_PLACE_UNDEFINED;
  ------------------
  |  |  960|      1|#define KMP_PLACE_UNDEFINED (-2)
  ------------------
 3986|      1|  root_thread->th.th_last_place = KMP_PLACE_UNDEFINED;
  ------------------
  |  |  960|      1|#define KMP_PLACE_UNDEFINED (-2)
  ------------------
 3987|      1|#endif /* KMP_AFFINITY_SUPPORTED */
 3988|      1|  root_thread->th.th_def_allocator = __kmp_def_allocator;
 3989|      1|  root_thread->th.th_prev_level = 0;
 3990|      1|  root_thread->th.th_prev_num_threads = 1;
 3991|       |
 3992|      1|  kmp_cg_root_t *tmp = (kmp_cg_root_t *)__kmp_allocate(sizeof(kmp_cg_root_t));
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3993|      1|  tmp->cg_root = root_thread;
 3994|      1|  tmp->cg_thread_limit = __kmp_cg_max_nth;
 3995|      1|  tmp->cg_nthreads = 1;
 3996|      1|  KA_TRACE(100, ("__kmp_register_root: Thread %p created node %p with"
 3997|      1|                 " cg_nthreads init to 1\n",
 3998|      1|                 root_thread, tmp));
 3999|      1|  tmp->up = NULL;
 4000|      1|  root_thread->th.th_cg_roots = tmp;
 4001|       |
 4002|      1|  __kmp_root_counter++;
 4003|       |
 4004|      1|#if OMPT_SUPPORT
 4005|      1|  if (!initial_thread && ompt_enabled.enabled) {
  ------------------
  |  Branch (4005:7): [True: 0, False: 1]
  |  Branch (4005:26): [True: 0, False: 0]
  ------------------
 4006|       |
 4007|      0|    kmp_info_t *root_thread = ompt_get_thread();
 4008|       |
 4009|      0|    ompt_set_thread_state(root_thread, ompt_state_overhead);
 4010|       |
 4011|      0|    if (ompt_enabled.ompt_callback_thread_begin) {
  ------------------
  |  Branch (4011:9): [True: 0, False: 0]
  ------------------
 4012|      0|      ompt_callbacks.ompt_callback(ompt_callback_thread_begin)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
 4013|      0|          ompt_thread_initial, __ompt_get_thread_data_internal());
 4014|      0|    }
 4015|      0|    ompt_data_t *task_data;
 4016|      0|    ompt_data_t *parallel_data;
 4017|      0|    __ompt_get_task_info_internal(0, NULL, &task_data, NULL, &parallel_data,
 4018|      0|                                  NULL);
 4019|      0|    if (ompt_enabled.ompt_callback_implicit_task) {
  ------------------
  |  Branch (4019:9): [True: 0, False: 0]
  ------------------
 4020|      0|      ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
 4021|      0|          ompt_scope_begin, parallel_data, task_data, 1, 1, ompt_task_initial);
 4022|      0|    }
 4023|       |
 4024|      0|    ompt_set_thread_state(root_thread, ompt_state_work_serial);
 4025|      0|  }
 4026|      1|#endif
 4027|      1|#if OMPD_SUPPORT
 4028|      1|  if (ompd_state & OMPD_ENABLE_BP)
  ------------------
  |  |   35|      1|#define OMPD_ENABLE_BP 0x1
  ------------------
  |  Branch (4028:7): [True: 0, False: 1]
  ------------------
 4029|      0|    ompd_bp_thread_begin();
 4030|      1|#endif
 4031|       |
 4032|      1|  KMP_MB();
 4033|      1|  __kmp_release_bootstrap_lock(&__kmp_forkjoin_lock);
 4034|       |
 4035|      1|  return gtid;
 4036|      1|}
_Z36__kmp_unregister_root_current_threadi:
 4160|      1|void __kmp_unregister_root_current_thread(int gtid) {
 4161|      1|  KA_TRACE(1, ("__kmp_unregister_root_current_thread: enter T#%d\n", gtid));
 4162|       |  /* this lock should be ok, since unregister_root_current_thread is never
 4163|       |     called during an abort, only during a normal close. furthermore, if you
 4164|       |     have the forkjoin lock, you should never try to get the initz lock */
 4165|      1|  __kmp_acquire_bootstrap_lock(&__kmp_forkjoin_lock);
 4166|      1|  if (TCR_4(__kmp_global.g.g_done) || !__kmp_init_serial) {
  ------------------
  |  | 1127|      2|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (4166:39): [True: 0, False: 1]
  ------------------
 4167|      0|    KC_TRACE(10, ("__kmp_unregister_root_current_thread: already finished, "
 4168|      0|                  "exiting T#%d\n",
 4169|      0|                  gtid));
 4170|      0|    __kmp_release_bootstrap_lock(&__kmp_forkjoin_lock);
 4171|      0|    return;
 4172|      0|  }
 4173|      1|  kmp_root_t *root = __kmp_root[gtid];
 4174|       |
 4175|      1|  KMP_DEBUG_ASSERT(__kmp_threads && __kmp_threads[gtid]);
 4176|      1|  KMP_ASSERT(KMP_UBER_GTID(gtid));
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 4177|      1|  KMP_ASSERT(root == __kmp_threads[gtid]->th.th_root);
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 4178|      1|  KMP_ASSERT(root->r.r_active == FALSE);
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 4179|       |
 4180|      1|  KMP_MB();
 4181|       |
 4182|      1|  kmp_info_t *thread = __kmp_threads[gtid];
 4183|      1|  kmp_team_t *team = thread->th.th_team;
 4184|      1|  kmp_task_team_t *task_team = thread->th.th_task_team;
 4185|       |
 4186|       |  // we need to wait for the proxy tasks before finishing the thread
 4187|      1|  if (task_team != NULL && (task_team->tt.tt_found_proxy_tasks ||
  ------------------
  |  Branch (4187:7): [True: 0, False: 1]
  |  Branch (4187:29): [True: 0, False: 0]
  ------------------
 4188|      0|                            task_team->tt.tt_hidden_helper_task_encountered)) {
  ------------------
  |  Branch (4188:29): [True: 0, False: 0]
  ------------------
 4189|      0|#if OMPT_SUPPORT
 4190|       |    // the runtime is shutting down so we won't report any events
 4191|      0|    thread->th.ompt_thread_info.state = ompt_state_undefined;
 4192|      0|#endif
 4193|      0|    __kmp_task_team_wait(thread, team USE_ITT_BUILD_ARG(NULL));
 4194|      0|  }
 4195|       |
 4196|      1|  __kmp_reset_root(gtid, root);
 4197|       |
 4198|      1|  KMP_MB();
 4199|      1|  KC_TRACE(10,
 4200|      1|           ("__kmp_unregister_root_current_thread: T#%d unregistered\n", gtid));
 4201|       |
 4202|      1|  __kmp_release_bootstrap_lock(&__kmp_forkjoin_lock);
 4203|      1|}
__kmp_allocate_team:
 5130|      3|                    int argc USE_NESTED_HOT_ARG(kmp_info_t *master)) {
 5131|      3|  KMP_TIME_DEVELOPER_PARTITIONED_BLOCK(KMP_allocate_team);
  ------------------
  |  | 1008|      3|#define KMP_TIME_DEVELOPER_PARTITIONED_BLOCK(n) ((void)0)
  ------------------
 5132|      3|  int f;
 5133|      3|  kmp_team_t *team;
 5134|      3|  int use_hot_team = !root->r.r_active;
 5135|      3|  int level = 0;
 5136|      3|  int do_place_partition = 1;
 5137|       |
 5138|      3|  KA_TRACE(20, ("__kmp_allocate_team: called\n"));
 5139|      3|  KMP_DEBUG_ASSERT(new_nproc >= 1 && argc >= 0);
 5140|      3|  KMP_DEBUG_ASSERT(max_nproc >= new_nproc);
 5141|      3|  KMP_MB();
 5142|       |
 5143|      3|#if KMP_NESTED_HOT_TEAMS
 5144|      3|  kmp_hot_team_ptr_t *hot_teams;
 5145|      3|  if (master) {
  ------------------
  |  Branch (5145:7): [True: 0, False: 3]
  ------------------
 5146|      0|    team = master->th.th_team;
 5147|      0|    level = team->t.t_active_level;
 5148|      0|    if (master->th.th_teams_microtask) { // in teams construct?
  ------------------
  |  Branch (5148:9): [True: 0, False: 0]
  ------------------
 5149|      0|      if (master->th.th_teams_size.nteams > 1 &&
  ------------------
  |  Branch (5149:11): [True: 0, False: 0]
  ------------------
 5150|      0|          ( // #teams > 1
 5151|      0|              team->t.t_pkfn ==
  ------------------
  |  Branch (5151:15): [True: 0, False: 0]
  ------------------
 5152|      0|                  (microtask_t)__kmp_teams_master || // inner fork of the teams
 5153|      0|              master->th.th_teams_level <
  ------------------
  |  Branch (5153:15): [True: 0, False: 0]
  ------------------
 5154|      0|                  team->t.t_level)) { // or nested parallel inside the teams
 5155|      0|        ++level; // not increment if #teams==1, or for outer fork of the teams;
 5156|       |        // increment otherwise
 5157|      0|      }
 5158|       |      // Do not perform the place partition if inner fork of the teams
 5159|       |      // Wait until nested parallel region encountered inside teams construct
 5160|      0|      if ((master->th.th_teams_size.nteams == 1 &&
  ------------------
  |  Branch (5160:12): [True: 0, False: 0]
  ------------------
 5161|      0|           master->th.th_teams_level >= team->t.t_level) ||
  ------------------
  |  Branch (5161:12): [True: 0, False: 0]
  ------------------
 5162|      0|          (team->t.t_pkfn == (microtask_t)__kmp_teams_master))
  ------------------
  |  Branch (5162:11): [True: 0, False: 0]
  ------------------
 5163|      0|        do_place_partition = 0;
 5164|      0|    }
 5165|      0|    hot_teams = master->th.th_hot_teams;
 5166|      0|    if (level < __kmp_hot_teams_max_level && hot_teams &&
  ------------------
  |  Branch (5166:9): [True: 0, False: 0]
  |  Branch (5166:46): [True: 0, False: 0]
  ------------------
 5167|      0|        hot_teams[level].hot_team) {
  ------------------
  |  Branch (5167:9): [True: 0, False: 0]
  ------------------
 5168|       |      // hot team has already been allocated for given level
 5169|      0|      use_hot_team = 1;
 5170|      0|    } else {
 5171|      0|      use_hot_team = 0;
 5172|      0|    }
 5173|      3|  } else {
 5174|       |    // check we won't access uninitialized hot_teams, just in case
 5175|      3|    KMP_DEBUG_ASSERT(new_nproc == 1);
 5176|      3|  }
 5177|      3|#endif
 5178|       |  // Optimization to use a "hot" team
 5179|      3|  if (use_hot_team && new_nproc > 1) {
  ------------------
  |  Branch (5179:7): [True: 3, False: 0]
  |  Branch (5179:23): [True: 0, False: 3]
  ------------------
 5180|      0|    KMP_DEBUG_ASSERT(new_nproc <= max_nproc);
 5181|      0|#if KMP_NESTED_HOT_TEAMS
 5182|      0|    team = hot_teams[level].hot_team;
 5183|       |#else
 5184|       |    team = root->r.r_hot_team;
 5185|       |#endif
 5186|       |#if KMP_DEBUG
 5187|       |    if (__kmp_tasking_mode != tskm_immediate_exec) {
 5188|       |      KA_TRACE(20, ("__kmp_allocate_team: hot team task_team[0] = %p "
 5189|       |                    "task_team[1] = %p before reinit\n",
 5190|       |                    team->t.t_task_team[0], team->t.t_task_team[1]));
 5191|       |    }
 5192|       |#endif
 5193|       |
 5194|      0|    if (team->t.t_nproc != new_nproc &&
  ------------------
  |  Branch (5194:9): [True: 0, False: 0]
  ------------------
 5195|      0|        __kmp_barrier_release_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5195:9): [True: 0, False: 0]
  ------------------
 5196|       |      // Distributed barrier may need a resize
 5197|      0|      int old_nthr = team->t.t_nproc;
 5198|      0|      __kmp_resize_dist_barrier(team, old_nthr, new_nproc);
 5199|      0|    }
 5200|       |
 5201|       |    // If not doing the place partition, then reset the team's proc bind
 5202|       |    // to indicate that partitioning of all threads still needs to take place
 5203|      0|    if (do_place_partition == 0)
  ------------------
  |  Branch (5203:9): [True: 0, False: 0]
  ------------------
 5204|      0|      team->t.t_proc_bind = proc_bind_default;
 5205|       |    // Has the number of threads changed?
 5206|       |    /* Let's assume the most common case is that the number of threads is
 5207|       |       unchanged, and put that case first. */
 5208|      0|    if (team->t.t_nproc == new_nproc) { // Check changes in number of threads
  ------------------
  |  Branch (5208:9): [True: 0, False: 0]
  ------------------
 5209|      0|      KA_TRACE(20, ("__kmp_allocate_team: reusing hot team\n"));
 5210|       |      // This case can mean that omp_set_num_threads() was called and the hot
 5211|       |      // team size was already reduced, so we check the special flag
 5212|      0|      if (team->t.t_size_changed == -1) {
  ------------------
  |  Branch (5212:11): [True: 0, False: 0]
  ------------------
 5213|      0|        team->t.t_size_changed = 1;
 5214|      0|      } else {
 5215|      0|        KMP_CHECK_UPDATE(team->t.t_size_changed, 0);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5216|      0|      }
 5217|       |
 5218|       |      // TODO???: team->t.t_max_active_levels = new_max_active_levels;
 5219|      0|      kmp_r_sched_t new_sched = new_icvs->sched;
 5220|       |      // set primary thread's schedule as new run-time schedule
 5221|      0|      KMP_CHECK_UPDATE(team->t.t_sched.sched, new_sched.sched);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5222|       |
 5223|      0|      __kmp_reinitialize_team(team, new_icvs,
 5224|      0|                              root->r.r_uber_thread->th.th_ident);
 5225|       |
 5226|      0|      KF_TRACE(10, ("__kmp_allocate_team2: T#%d, this_thread=%p team=%p\n", 0,
 5227|      0|                    team->t.t_threads[0], team));
 5228|      0|      __kmp_push_current_task_to_thread(team->t.t_threads[0], team, 0);
 5229|       |
 5230|      0|#if KMP_AFFINITY_SUPPORTED
 5231|      0|      if ((team->t.t_size_changed == 0) &&
  ------------------
  |  Branch (5231:11): [True: 0, False: 0]
  ------------------
 5232|      0|          (team->t.t_proc_bind == new_proc_bind)) {
  ------------------
  |  Branch (5232:11): [True: 0, False: 0]
  ------------------
 5233|      0|        if (new_proc_bind == proc_bind_spread) {
  ------------------
  |  Branch (5233:13): [True: 0, False: 0]
  ------------------
 5234|      0|          if (do_place_partition) {
  ------------------
  |  Branch (5234:15): [True: 0, False: 0]
  ------------------
 5235|       |            // add flag to update only master for spread
 5236|      0|            __kmp_partition_places(team, 1);
 5237|      0|          }
 5238|      0|        }
 5239|      0|        KA_TRACE(200, ("__kmp_allocate_team: reusing hot team #%d bindings: "
 5240|      0|                       "proc_bind = %d, partition = [%d,%d]\n",
 5241|      0|                       team->t.t_id, new_proc_bind, team->t.t_first_place,
 5242|      0|                       team->t.t_last_place));
 5243|      0|      } else {
 5244|      0|        if (do_place_partition) {
  ------------------
  |  Branch (5244:13): [True: 0, False: 0]
  ------------------
 5245|      0|          KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5246|      0|          __kmp_partition_places(team);
 5247|      0|        }
 5248|      0|      }
 5249|       |#else
 5250|       |      KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind);
 5251|       |#endif /* KMP_AFFINITY_SUPPORTED */
 5252|      0|    } else if (team->t.t_nproc > new_nproc) {
  ------------------
  |  Branch (5252:16): [True: 0, False: 0]
  ------------------
 5253|      0|      KA_TRACE(20,
 5254|      0|               ("__kmp_allocate_team: decreasing hot team thread count to %d\n",
 5255|      0|                new_nproc));
 5256|       |
 5257|      0|      team->t.t_size_changed = 1;
 5258|      0|      if (__kmp_barrier_release_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5258:11): [True: 0, False: 0]
  ------------------
 5259|       |        // Barrier size already reduced earlier in this function
 5260|       |        // Activate team threads via th_used_in_team
 5261|      0|        __kmp_add_threads_to_team(team, new_nproc);
 5262|      0|      }
 5263|      0|#if KMP_NESTED_HOT_TEAMS
 5264|      0|      if (__kmp_hot_teams_mode == 0) {
  ------------------
  |  Branch (5264:11): [True: 0, False: 0]
  ------------------
 5265|       |        // AC: saved number of threads should correspond to team's value in this
 5266|       |        // mode, can be bigger in mode 1, when hot team has threads in reserve
 5267|      0|        KMP_DEBUG_ASSERT(hot_teams[level].hot_team_nth == team->t.t_nproc);
 5268|      0|        hot_teams[level].hot_team_nth = new_nproc;
 5269|      0|#endif // KMP_NESTED_HOT_TEAMS
 5270|       |        /* release the extra threads we don't need any more */
 5271|      0|        for (f = new_nproc; f < team->t.t_nproc; f++) {
  ------------------
  |  Branch (5271:29): [True: 0, False: 0]
  ------------------
 5272|      0|          KMP_DEBUG_ASSERT(team->t.t_threads[f]);
 5273|      0|          if (__kmp_tasking_mode != tskm_immediate_exec) {
  ------------------
  |  Branch (5273:15): [True: 0, False: 0]
  ------------------
 5274|       |            // When decreasing team size, threads no longer in the team should
 5275|       |            // unref task team.
 5276|      0|            team->t.t_threads[f]->th.th_task_team = NULL;
 5277|      0|          }
 5278|      0|          __kmp_free_thread(team->t.t_threads[f]);
 5279|      0|          team->t.t_threads[f] = NULL;
 5280|      0|        }
 5281|      0|#if KMP_NESTED_HOT_TEAMS
 5282|      0|      } // (__kmp_hot_teams_mode == 0)
 5283|      0|      else {
 5284|       |        // When keeping extra threads in team, switch threads to wait on own
 5285|       |        // b_go flag
 5286|      0|        for (f = new_nproc; f < team->t.t_nproc; ++f) {
  ------------------
  |  Branch (5286:29): [True: 0, False: 0]
  ------------------
 5287|      0|          KMP_DEBUG_ASSERT(team->t.t_threads[f]);
 5288|      0|          kmp_balign_t *balign = team->t.t_threads[f]->th.th_bar;
 5289|      0|          for (int b = 0; b < bs_last_barrier; ++b) {
  ------------------
  |  Branch (5289:27): [True: 0, False: 0]
  ------------------
 5290|      0|            if (balign[b].bb.wait_flag == KMP_BARRIER_PARENT_FLAG) {
  ------------------
  |  | 2039|      0|  2 // Special state; worker waiting on parent's b_go flag in release
  ------------------
  |  Branch (5290:17): [True: 0, False: 0]
  ------------------
 5291|      0|              balign[b].bb.wait_flag = KMP_BARRIER_SWITCH_TO_OWN_FLAG;
  ------------------
  |  | 2041|      0|  3 // Special state; tells worker to shift from parent to own b_go
  ------------------
 5292|      0|            }
 5293|      0|            KMP_CHECK_UPDATE(balign[b].bb.leaf_kids, 0);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5294|      0|          }
 5295|      0|        }
 5296|      0|      }
 5297|      0|#endif // KMP_NESTED_HOT_TEAMS
 5298|      0|      team->t.t_nproc = new_nproc;
 5299|       |      // TODO???: team->t.t_max_active_levels = new_max_active_levels;
 5300|      0|      KMP_CHECK_UPDATE(team->t.t_sched.sched, new_icvs->sched.sched);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5301|      0|      __kmp_reinitialize_team(team, new_icvs,
 5302|      0|                              root->r.r_uber_thread->th.th_ident);
 5303|       |
 5304|       |      // Update remaining threads
 5305|      0|      for (f = 0; f < new_nproc; ++f) {
  ------------------
  |  Branch (5305:19): [True: 0, False: 0]
  ------------------
 5306|      0|        team->t.t_threads[f]->th.th_team_nproc = new_nproc;
 5307|      0|      }
 5308|       |
 5309|       |      // restore the current task state of the primary thread: should be the
 5310|       |      // implicit task
 5311|      0|      KF_TRACE(10, ("__kmp_allocate_team: T#%d, this_thread=%p team=%p\n", 0,
 5312|      0|                    team->t.t_threads[0], team));
 5313|       |
 5314|      0|      __kmp_push_current_task_to_thread(team->t.t_threads[0], team, 0);
 5315|       |
 5316|       |#ifdef KMP_DEBUG
 5317|       |      for (f = 0; f < team->t.t_nproc; f++) {
 5318|       |        KMP_DEBUG_ASSERT(team->t.t_threads[f] &&
 5319|       |                         team->t.t_threads[f]->th.th_team_nproc ==
 5320|       |                             team->t.t_nproc);
 5321|       |      }
 5322|       |#endif
 5323|       |
 5324|      0|      if (do_place_partition) {
  ------------------
  |  Branch (5324:11): [True: 0, False: 0]
  ------------------
 5325|      0|        KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5326|      0|#if KMP_AFFINITY_SUPPORTED
 5327|      0|        __kmp_partition_places(team);
 5328|      0|#endif
 5329|      0|      }
 5330|      0|    } else { // team->t.t_nproc < new_nproc
 5331|       |
 5332|      0|      KA_TRACE(20,
 5333|      0|               ("__kmp_allocate_team: increasing hot team thread count to %d\n",
 5334|      0|                new_nproc));
 5335|      0|      int old_nproc = team->t.t_nproc; // save old value and use to update only
 5336|      0|      team->t.t_size_changed = 1;
 5337|       |
 5338|      0|#if KMP_NESTED_HOT_TEAMS
 5339|      0|      int avail_threads = hot_teams[level].hot_team_nth;
 5340|      0|      if (new_nproc < avail_threads)
  ------------------
  |  Branch (5340:11): [True: 0, False: 0]
  ------------------
 5341|      0|        avail_threads = new_nproc;
 5342|      0|      kmp_info_t **other_threads = team->t.t_threads;
 5343|      0|      for (f = team->t.t_nproc; f < avail_threads; ++f) {
  ------------------
  |  Branch (5343:33): [True: 0, False: 0]
  ------------------
 5344|       |        // Adjust barrier data of reserved threads (if any) of the team
 5345|       |        // Other data will be set in __kmp_initialize_info() below.
 5346|      0|        int b;
 5347|      0|        kmp_balign_t *balign = other_threads[f]->th.th_bar;
 5348|      0|        for (b = 0; b < bs_last_barrier; ++b) {
  ------------------
  |  Branch (5348:21): [True: 0, False: 0]
  ------------------
 5349|      0|          balign[b].bb.b_arrived = team->t.t_bar[b].b_arrived;
 5350|      0|          KMP_DEBUG_ASSERT(balign[b].bb.wait_flag != KMP_BARRIER_PARENT_FLAG);
 5351|       |#if USE_DEBUGGER
 5352|       |          balign[b].bb.b_worker_arrived = team->t.t_bar[b].b_team_arrived;
 5353|       |#endif
 5354|      0|        }
 5355|      0|      }
 5356|      0|      if (hot_teams[level].hot_team_nth >= new_nproc) {
  ------------------
  |  Branch (5356:11): [True: 0, False: 0]
  ------------------
 5357|       |        // we have all needed threads in reserve, no need to allocate any
 5358|       |        // this only possible in mode 1, cannot have reserved threads in mode 0
 5359|      0|        KMP_DEBUG_ASSERT(__kmp_hot_teams_mode == 1);
 5360|      0|        team->t.t_nproc = new_nproc; // just get reserved threads involved
 5361|      0|      } else {
 5362|       |        // We may have some threads in reserve, but not enough;
 5363|       |        // get reserved threads involved if any.
 5364|      0|        team->t.t_nproc = hot_teams[level].hot_team_nth;
 5365|      0|        hot_teams[level].hot_team_nth = new_nproc; // adjust hot team max size
 5366|      0|#endif // KMP_NESTED_HOT_TEAMS
 5367|      0|        if (team->t.t_max_nproc < new_nproc) {
  ------------------
  |  Branch (5367:13): [True: 0, False: 0]
  ------------------
 5368|       |          /* reallocate larger arrays */
 5369|      0|          __kmp_reallocate_team_arrays(team, new_nproc);
 5370|      0|          __kmp_reinitialize_team(team, new_icvs, NULL);
 5371|      0|        }
 5372|       |
 5373|      0|#if (KMP_OS_LINUX || KMP_OS_FREEBSD) && KMP_AFFINITY_SUPPORTED
 5374|       |        /* Temporarily set full mask for primary thread before creation of
 5375|       |           workers. The reason is that workers inherit the affinity from the
 5376|       |           primary thread, so if a lot of workers are created on the single
 5377|       |           core quickly, they don't get a chance to set their own affinity for
 5378|       |           a long time. */
 5379|      0|        kmp_affinity_raii_t new_temp_affinity{__kmp_affin_fullMask};
 5380|      0|#endif
 5381|       |
 5382|       |        /* allocate new threads for the hot team */
 5383|      0|        for (f = team->t.t_nproc; f < new_nproc; f++) {
  ------------------
  |  Branch (5383:35): [True: 0, False: 0]
  ------------------
 5384|      0|          kmp_info_t *new_worker = __kmp_allocate_thread(root, team, f);
 5385|      0|          KMP_DEBUG_ASSERT(new_worker);
 5386|      0|          team->t.t_threads[f] = new_worker;
 5387|       |
 5388|      0|          KA_TRACE(20,
 5389|      0|                   ("__kmp_allocate_team: team %d init T#%d arrived: "
 5390|      0|                    "join=%llu, plain=%llu\n",
 5391|      0|                    team->t.t_id, __kmp_gtid_from_tid(f, team), team->t.t_id, f,
 5392|      0|                    team->t.t_bar[bs_forkjoin_barrier].b_arrived,
 5393|      0|                    team->t.t_bar[bs_plain_barrier].b_arrived));
 5394|       |
 5395|      0|          { // Initialize barrier data for new threads.
 5396|      0|            int b;
 5397|      0|            kmp_balign_t *balign = new_worker->th.th_bar;
 5398|      0|            for (b = 0; b < bs_last_barrier; ++b) {
  ------------------
  |  Branch (5398:25): [True: 0, False: 0]
  ------------------
 5399|      0|              balign[b].bb.b_arrived = team->t.t_bar[b].b_arrived;
 5400|      0|              KMP_DEBUG_ASSERT(balign[b].bb.wait_flag !=
 5401|      0|                               KMP_BARRIER_PARENT_FLAG);
 5402|       |#if USE_DEBUGGER
 5403|       |              balign[b].bb.b_worker_arrived = team->t.t_bar[b].b_team_arrived;
 5404|       |#endif
 5405|      0|            }
 5406|      0|          }
 5407|      0|        }
 5408|       |
 5409|      0|#if (KMP_OS_LINUX || KMP_OS_FREEBSD) && KMP_AFFINITY_SUPPORTED
 5410|       |        /* Restore initial primary thread's affinity mask */
 5411|      0|        new_temp_affinity.restore();
 5412|      0|#endif
 5413|      0|#if KMP_NESTED_HOT_TEAMS
 5414|      0|      } // end of check of t_nproc vs. new_nproc vs. hot_team_nth
 5415|      0|#endif // KMP_NESTED_HOT_TEAMS
 5416|      0|      if (__kmp_barrier_release_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5416:11): [True: 0, False: 0]
  ------------------
 5417|       |        // Barrier size already increased earlier in this function
 5418|       |        // Activate team threads via th_used_in_team
 5419|      0|        __kmp_add_threads_to_team(team, new_nproc);
 5420|      0|      }
 5421|       |      /* make sure everyone is syncronized */
 5422|       |      // new threads below
 5423|      0|      __kmp_initialize_team(team, new_nproc, new_icvs,
 5424|      0|                            root->r.r_uber_thread->th.th_ident);
 5425|       |
 5426|       |      /* reinitialize the threads */
 5427|      0|      KMP_DEBUG_ASSERT(team->t.t_nproc == new_nproc);
 5428|      0|      for (f = 0; f < team->t.t_nproc; ++f)
  ------------------
  |  Branch (5428:19): [True: 0, False: 0]
  ------------------
 5429|      0|        __kmp_initialize_info(team->t.t_threads[f], team, f,
 5430|      0|                              __kmp_gtid_from_tid(f, team));
 5431|       |
 5432|       |      // set th_task_state for new threads in hot team with older thread's state
 5433|      0|      kmp_uint8 old_state = team->t.t_threads[old_nproc - 1]->th.th_task_state;
 5434|      0|      for (f = old_nproc; f < team->t.t_nproc; ++f)
  ------------------
  |  Branch (5434:27): [True: 0, False: 0]
  ------------------
 5435|      0|        team->t.t_threads[f]->th.th_task_state = old_state;
 5436|       |
 5437|       |#ifdef KMP_DEBUG
 5438|       |      for (f = 0; f < team->t.t_nproc; ++f) {
 5439|       |        KMP_DEBUG_ASSERT(team->t.t_threads[f] &&
 5440|       |                         team->t.t_threads[f]->th.th_team_nproc ==
 5441|       |                             team->t.t_nproc);
 5442|       |      }
 5443|       |#endif
 5444|       |
 5445|      0|      if (do_place_partition) {
  ------------------
  |  Branch (5445:11): [True: 0, False: 0]
  ------------------
 5446|      0|        KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5447|      0|#if KMP_AFFINITY_SUPPORTED
 5448|      0|        __kmp_partition_places(team);
 5449|      0|#endif
 5450|      0|      }
 5451|      0|    } // Check changes in number of threads
 5452|       |
 5453|      0|    kmp_info_t *master = team->t.t_threads[0];
 5454|      0|    if (master->th.th_teams_microtask) {
  ------------------
  |  Branch (5454:9): [True: 0, False: 0]
  ------------------
 5455|      0|      for (f = 1; f < new_nproc; ++f) {
  ------------------
  |  Branch (5455:19): [True: 0, False: 0]
  ------------------
 5456|       |        // propagate teams construct specific info to workers
 5457|      0|        kmp_info_t *thr = team->t.t_threads[f];
 5458|      0|        thr->th.th_teams_microtask = master->th.th_teams_microtask;
 5459|      0|        thr->th.th_teams_level = master->th.th_teams_level;
 5460|      0|        thr->th.th_teams_size = master->th.th_teams_size;
 5461|      0|      }
 5462|      0|    }
 5463|      0|#if KMP_NESTED_HOT_TEAMS
 5464|      0|    if (level) {
  ------------------
  |  Branch (5464:9): [True: 0, False: 0]
  ------------------
 5465|       |      // Sync barrier state for nested hot teams, not needed for outermost hot
 5466|       |      // team.
 5467|      0|      for (f = 1; f < new_nproc; ++f) {
  ------------------
  |  Branch (5467:19): [True: 0, False: 0]
  ------------------
 5468|      0|        kmp_info_t *thr = team->t.t_threads[f];
 5469|      0|        int b;
 5470|      0|        kmp_balign_t *balign = thr->th.th_bar;
 5471|      0|        for (b = 0; b < bs_last_barrier; ++b) {
  ------------------
  |  Branch (5471:21): [True: 0, False: 0]
  ------------------
 5472|      0|          balign[b].bb.b_arrived = team->t.t_bar[b].b_arrived;
 5473|      0|          KMP_DEBUG_ASSERT(balign[b].bb.wait_flag != KMP_BARRIER_PARENT_FLAG);
 5474|       |#if USE_DEBUGGER
 5475|       |          balign[b].bb.b_worker_arrived = team->t.t_bar[b].b_team_arrived;
 5476|       |#endif
 5477|      0|        }
 5478|      0|      }
 5479|      0|    }
 5480|      0|#endif // KMP_NESTED_HOT_TEAMS
 5481|       |
 5482|       |    /* reallocate space for arguments if necessary */
 5483|      0|    __kmp_alloc_argv_entries(argc, team, TRUE);
  ------------------
  |  | 1280|      0|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      0|#define FALSE 0
  |  |  ------------------
  ------------------
 5484|      0|    KMP_CHECK_UPDATE(team->t.t_argc, argc);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5485|       |    // The hot team re-uses the previous task team,
 5486|       |    // if untouched during the previous release->gather phase.
 5487|       |
 5488|      0|    KF_TRACE(10, (" hot_team = %p\n", team));
 5489|       |
 5490|       |#if KMP_DEBUG
 5491|       |    if (__kmp_tasking_mode != tskm_immediate_exec) {
 5492|       |      KA_TRACE(20, ("__kmp_allocate_team: hot team task_team[0] = %p "
 5493|       |                    "task_team[1] = %p after reinit\n",
 5494|       |                    team->t.t_task_team[0], team->t.t_task_team[1]));
 5495|       |    }
 5496|       |#endif
 5497|       |
 5498|      0|#if OMPT_SUPPORT
 5499|      0|    __ompt_team_assign_id(team, ompt_parallel_data);
 5500|      0|#endif
 5501|       |
 5502|      0|    KMP_MB();
 5503|       |
 5504|      0|    return team;
 5505|      0|  }
 5506|       |
 5507|       |  /* next, let's try to take one from the team pool */
 5508|      3|  KMP_MB();
 5509|      3|  for (team = CCAST(kmp_team_t *, __kmp_team_pool); (team);) {
  ------------------
  |  |  229|      3|#define CCAST(type, var) const_cast<type>(var)
  ------------------
  |  Branch (5509:53): [True: 0, False: 3]
  ------------------
 5510|       |    /* TODO: consider resizing undersized teams instead of reaping them, now
 5511|       |       that we have a resizing mechanism */
 5512|      0|    if (team->t.t_max_nproc >= max_nproc) {
  ------------------
  |  Branch (5512:9): [True: 0, False: 0]
  ------------------
 5513|       |      /* take this team from the team pool */
 5514|      0|      __kmp_team_pool = team->t.t_next_pool;
 5515|       |
 5516|      0|      if (max_nproc > 1 &&
  ------------------
  |  Branch (5516:11): [True: 0, False: 0]
  ------------------
 5517|      0|          __kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5517:11): [True: 0, False: 0]
  ------------------
 5518|      0|        if (!team->t.b) { // Allocate barrier structure
  ------------------
  |  Branch (5518:13): [True: 0, False: 0]
  ------------------
 5519|      0|          team->t.b = distributedBarrier::allocate(__kmp_dflt_team_nth_ub);
 5520|      0|        }
 5521|      0|      }
 5522|       |
 5523|       |      /* setup the team for fresh use */
 5524|      0|      __kmp_initialize_team(team, new_nproc, new_icvs, NULL);
 5525|       |
 5526|      0|      KA_TRACE(20, ("__kmp_allocate_team: setting task_team[0] %p and "
 5527|      0|                    "task_team[1] %p to NULL\n",
 5528|      0|                    &team->t.t_task_team[0], &team->t.t_task_team[1]));
 5529|      0|      team->t.t_task_team[0] = NULL;
 5530|      0|      team->t.t_task_team[1] = NULL;
 5531|       |
 5532|       |      /* reallocate space for arguments if necessary */
 5533|      0|      __kmp_alloc_argv_entries(argc, team, TRUE);
  ------------------
  |  | 1280|      0|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      0|#define FALSE 0
  |  |  ------------------
  ------------------
 5534|      0|      KMP_CHECK_UPDATE(team->t.t_argc, argc);
  ------------------
  |  | 2280|      0|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 2281|      0|  (a) = (b)
  ------------------
 5535|       |
 5536|      0|      KA_TRACE(
 5537|      0|          20, ("__kmp_allocate_team: team %d init arrived: join=%u, plain=%u\n",
 5538|      0|               team->t.t_id, KMP_INIT_BARRIER_STATE, KMP_INIT_BARRIER_STATE));
 5539|      0|      { // Initialize barrier data.
 5540|      0|        int b;
 5541|      0|        for (b = 0; b < bs_last_barrier; ++b) {
  ------------------
  |  Branch (5541:21): [True: 0, False: 0]
  ------------------
 5542|      0|          team->t.t_bar[b].b_arrived = KMP_INIT_BARRIER_STATE;
  ------------------
  |  | 2018|      0|#define KMP_INIT_BARRIER_STATE 0 /* should probably start from zero */
  ------------------
 5543|       |#if USE_DEBUGGER
 5544|       |          team->t.t_bar[b].b_master_arrived = 0;
 5545|       |          team->t.t_bar[b].b_team_arrived = 0;
 5546|       |#endif
 5547|      0|        }
 5548|      0|      }
 5549|       |
 5550|      0|      team->t.t_proc_bind = new_proc_bind;
 5551|       |
 5552|      0|      KA_TRACE(20, ("__kmp_allocate_team: using team from pool %d.\n",
 5553|      0|                    team->t.t_id));
 5554|       |
 5555|      0|#if OMPT_SUPPORT
 5556|      0|      __ompt_team_assign_id(team, ompt_parallel_data);
 5557|      0|#endif
 5558|       |
 5559|      0|      KMP_MB();
 5560|       |
 5561|      0|      return team;
 5562|      0|    }
 5563|       |
 5564|       |    /* reap team if it is too small, then loop back and check the next one */
 5565|       |    // not sure if this is wise, but, will be redone during the hot-teams
 5566|       |    // rewrite.
 5567|       |    /* TODO: Use technique to find the right size hot-team, don't reap them */
 5568|      0|    team = __kmp_reap_team(team);
 5569|      0|    __kmp_team_pool = team;
 5570|      0|  }
 5571|       |
 5572|       |  /* nothing available in the pool, no matter, make a new team! */
 5573|      3|  KMP_MB();
 5574|      3|  team = (kmp_team_t *)__kmp_allocate(sizeof(kmp_team_t));
  ------------------
  |  | 3617|      3|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 5575|       |
 5576|       |  /* and set it up */
 5577|      3|  team->t.t_max_nproc = max_nproc;
 5578|      3|  if (max_nproc > 1 &&
  ------------------
  |  Branch (5578:7): [True: 1, False: 2]
  ------------------
 5579|      1|      __kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5579:7): [True: 0, False: 1]
  ------------------
 5580|       |    // Allocate barrier structure
 5581|      0|    team->t.b = distributedBarrier::allocate(__kmp_dflt_team_nth_ub);
 5582|      0|  }
 5583|       |
 5584|       |  /* NOTE well, for some reason allocating one big buffer and dividing it up
 5585|       |     seems to really hurt performance a lot on the P4, so, let's not use this */
 5586|      3|  __kmp_allocate_team_arrays(team, max_nproc);
 5587|       |
 5588|      3|  KA_TRACE(20, ("__kmp_allocate_team: making a new team\n"));
 5589|      3|  __kmp_initialize_team(team, new_nproc, new_icvs, NULL);
 5590|       |
 5591|      3|  KA_TRACE(20, ("__kmp_allocate_team: setting task_team[0] %p and task_team[1] "
 5592|      3|                "%p to NULL\n",
 5593|      3|                &team->t.t_task_team[0], &team->t.t_task_team[1]));
 5594|      3|  team->t.t_task_team[0] = NULL; // to be removed, as __kmp_allocate zeroes
 5595|       |  // memory, no need to duplicate
 5596|      3|  team->t.t_task_team[1] = NULL; // to be removed, as __kmp_allocate zeroes
 5597|       |  // memory, no need to duplicate
 5598|       |
 5599|      3|  if (__kmp_storage_map) {
  ------------------
  |  Branch (5599:7): [True: 0, False: 3]
  ------------------
 5600|      0|    __kmp_print_team_storage_map("team", team, team->t.t_id, new_nproc);
 5601|      0|  }
 5602|       |
 5603|       |  /* allocate space for arguments */
 5604|      3|  __kmp_alloc_argv_entries(argc, team, FALSE);
  ------------------
  |  | 1279|      3|#define FALSE 0
  ------------------
 5605|      3|  team->t.t_argc = argc;
 5606|       |
 5607|      3|  KA_TRACE(20,
 5608|      3|           ("__kmp_allocate_team: team %d init arrived: join=%u, plain=%u\n",
 5609|      3|            team->t.t_id, KMP_INIT_BARRIER_STATE, KMP_INIT_BARRIER_STATE));
 5610|      3|  { // Initialize barrier data.
 5611|      3|    int b;
 5612|     12|    for (b = 0; b < bs_last_barrier; ++b) {
  ------------------
  |  Branch (5612:17): [True: 9, False: 3]
  ------------------
 5613|      9|      team->t.t_bar[b].b_arrived = KMP_INIT_BARRIER_STATE;
  ------------------
  |  | 2018|      9|#define KMP_INIT_BARRIER_STATE 0 /* should probably start from zero */
  ------------------
 5614|       |#if USE_DEBUGGER
 5615|       |      team->t.t_bar[b].b_master_arrived = 0;
 5616|       |      team->t.t_bar[b].b_team_arrived = 0;
 5617|       |#endif
 5618|      9|    }
 5619|      3|  }
 5620|       |
 5621|      3|  team->t.t_proc_bind = new_proc_bind;
 5622|       |
 5623|      3|#if OMPT_SUPPORT
 5624|      3|  __ompt_team_assign_id(team, ompt_parallel_data);
 5625|      3|  team->t.ompt_serialized_team_info = NULL;
 5626|      3|#endif
 5627|       |
 5628|      3|  KMP_MB();
 5629|       |
 5630|      3|  KA_TRACE(20, ("__kmp_allocate_team: done creating a new team %d.\n",
 5631|      3|                team->t.t_id));
 5632|       |
 5633|      3|  return team;
 5634|      3|}
__kmp_free_team:
 5642|      2|                     kmp_team_t *team USE_NESTED_HOT_ARG(kmp_info_t *master)) {
 5643|      2|  int f;
 5644|      2|  KA_TRACE(20, ("__kmp_free_team: T#%d freeing team %d\n", __kmp_get_gtid(),
 5645|      2|                team->t.t_id));
 5646|       |
 5647|       |  /* verify state */
 5648|      2|  KMP_DEBUG_ASSERT(root);
 5649|      2|  KMP_DEBUG_ASSERT(team);
 5650|      2|  KMP_DEBUG_ASSERT(team->t.t_nproc <= team->t.t_max_nproc);
 5651|      2|  KMP_DEBUG_ASSERT(team->t.t_threads);
 5652|       |
 5653|      2|  int use_hot_team = team == root->r.r_hot_team;
 5654|      2|#if KMP_NESTED_HOT_TEAMS
 5655|      2|  int level;
 5656|      2|  if (master) {
  ------------------
  |  Branch (5656:7): [True: 0, False: 2]
  ------------------
 5657|      0|    level = team->t.t_active_level - 1;
 5658|      0|    if (master->th.th_teams_microtask) { // in teams construct?
  ------------------
  |  Branch (5658:9): [True: 0, False: 0]
  ------------------
 5659|      0|      if (master->th.th_teams_size.nteams > 1) {
  ------------------
  |  Branch (5659:11): [True: 0, False: 0]
  ------------------
 5660|      0|        ++level; // level was not increased in teams construct for
 5661|       |        // team_of_masters
 5662|      0|      }
 5663|      0|      if (team->t.t_pkfn != (microtask_t)__kmp_teams_master &&
  ------------------
  |  Branch (5663:11): [True: 0, False: 0]
  ------------------
 5664|      0|          master->th.th_teams_level == team->t.t_level) {
  ------------------
  |  Branch (5664:11): [True: 0, False: 0]
  ------------------
 5665|      0|        ++level; // level was not increased in teams construct for
 5666|       |        // team_of_workers before the parallel
 5667|      0|      } // team->t.t_level will be increased inside parallel
 5668|      0|    }
 5669|       |#if KMP_DEBUG
 5670|       |    kmp_hot_team_ptr_t *hot_teams = master->th.th_hot_teams;
 5671|       |#endif
 5672|      0|    if (level < __kmp_hot_teams_max_level) {
  ------------------
  |  Branch (5672:9): [True: 0, False: 0]
  ------------------
 5673|      0|      KMP_DEBUG_ASSERT(team == hot_teams[level].hot_team);
 5674|      0|      use_hot_team = 1;
 5675|      0|    }
 5676|      0|  }
 5677|      2|#endif // KMP_NESTED_HOT_TEAMS
 5678|       |
 5679|       |  /* team is done working */
 5680|      2|  TCW_SYNC_PTR(team->t.t_pkfn,
  ------------------
  |  | 1159|      2|#define TCW_SYNC_PTR(a, b) TCW_SYNC_8((a), (b))
  |  |  ------------------
  |  |  |  | 1141|      2|#define TCW_SYNC_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
 5681|      2|               NULL); // Important for Debugging Support Library.
 5682|       |#if KMP_OS_WINDOWS
 5683|       |  team->t.t_copyin_counter = 0; // init counter for possible reuse
 5684|       |#endif
 5685|       |  // Do not reset pointer to parent team to NULL for hot teams.
 5686|       |
 5687|       |  /* if we are non-hot team, release our threads */
 5688|      2|  if (!use_hot_team) {
  ------------------
  |  Branch (5688:7): [True: 2, False: 0]
  ------------------
 5689|      2|    if (__kmp_tasking_mode != tskm_immediate_exec) {
  ------------------
  |  Branch (5689:9): [True: 2, False: 0]
  ------------------
 5690|       |      // Wait for threads to reach reapable state
 5691|      2|      for (f = 1; f < team->t.t_nproc; ++f) {
  ------------------
  |  Branch (5691:19): [True: 0, False: 2]
  ------------------
 5692|      0|        KMP_DEBUG_ASSERT(team->t.t_threads[f]);
 5693|      0|        kmp_info_t *th = team->t.t_threads[f];
 5694|      0|        volatile kmp_uint32 *state = &th->th.th_reap_state;
 5695|      0|        while (*state != KMP_SAFE_TO_REAP) {
  ------------------
  |  | 2047|      0|#define KMP_SAFE_TO_REAP 1 // Thread th_reap_state: safe to reap (not tasking)
  ------------------
  |  Branch (5695:16): [True: 0, False: 0]
  ------------------
 5696|       |#if KMP_OS_WINDOWS
 5697|       |          // On Windows a thread can be killed at any time, check this
 5698|       |          DWORD ecode;
 5699|       |          if (!__kmp_is_thread_alive(th, &ecode)) {
 5700|       |            *state = KMP_SAFE_TO_REAP; // reset the flag for dead thread
 5701|       |            break;
 5702|       |          }
 5703|       |#endif
 5704|       |          // first check if thread is sleeping
 5705|      0|          kmp_flag_64<> fl(&th->th.th_bar[bs_forkjoin_barrier].bb.b_go, th);
 5706|      0|          if (fl.is_sleeping())
  ------------------
  |  Branch (5706:15): [True: 0, False: 0]
  ------------------
 5707|      0|            fl.resume(__kmp_gtid_from_thread(th));
 5708|      0|          KMP_CPU_PAUSE();
  ------------------
  |  | 1498|      0|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  ------------------
 5709|      0|        }
 5710|      0|      }
 5711|       |
 5712|       |      // Delete task teams
 5713|      2|      int tt_idx;
 5714|      6|      for (tt_idx = 0; tt_idx < 2; ++tt_idx) {
  ------------------
  |  Branch (5714:24): [True: 4, False: 2]
  ------------------
 5715|      4|        kmp_task_team_t *task_team = team->t.t_task_team[tt_idx];
 5716|      4|        if (task_team != NULL) {
  ------------------
  |  Branch (5716:13): [True: 0, False: 4]
  ------------------
 5717|      0|          for (f = 0; f < team->t.t_nproc; ++f) { // threads unref task teams
  ------------------
  |  Branch (5717:23): [True: 0, False: 0]
  ------------------
 5718|      0|            KMP_DEBUG_ASSERT(team->t.t_threads[f]);
 5719|      0|            team->t.t_threads[f]->th.th_task_team = NULL;
 5720|      0|          }
 5721|      0|          KA_TRACE(
 5722|      0|              20,
 5723|      0|              ("__kmp_free_team: T#%d deactivating task_team %p on team %d\n",
 5724|      0|               __kmp_get_gtid(), task_team, team->t.t_id));
 5725|      0|#if KMP_NESTED_HOT_TEAMS
 5726|      0|          __kmp_free_task_team(master, task_team);
 5727|      0|#endif
 5728|      0|          team->t.t_task_team[tt_idx] = NULL;
 5729|      0|        }
 5730|      4|      }
 5731|      2|    }
 5732|       |
 5733|       |    // Reset pointer to parent team only for non-hot teams.
 5734|      2|    team->t.t_parent = NULL;
 5735|      2|    team->t.t_level = 0;
 5736|      2|    team->t.t_active_level = 0;
 5737|       |
 5738|       |    /* free the worker threads */
 5739|      2|    for (f = 1; f < team->t.t_nproc; ++f) {
  ------------------
  |  Branch (5739:17): [True: 0, False: 2]
  ------------------
 5740|      0|      KMP_DEBUG_ASSERT(team->t.t_threads[f]);
 5741|      0|      if (__kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5741:11): [True: 0, False: 0]
  ------------------
 5742|      0|        KMP_COMPARE_AND_STORE_ACQ32(&(team->t.t_threads[f]->th.th_used_in_team),
  ------------------
  |  |  807|      0|  __sync_bool_compare_and_swap((volatile kmp_uint32 *)(p), (kmp_uint32)(cv),   \
  |  |  808|      0|                               (kmp_uint32)(sv))
  ------------------
 5743|      0|                                    1, 2);
 5744|      0|      }
 5745|      0|      __kmp_free_thread(team->t.t_threads[f]);
 5746|      0|    }
 5747|       |
 5748|      2|    if (__kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5748:9): [True: 0, False: 2]
  ------------------
 5749|      0|      if (team->t.b) {
  ------------------
  |  Branch (5749:11): [True: 0, False: 0]
  ------------------
 5750|       |        // wake up thread at old location
 5751|      0|        team->t.b->go_release();
 5752|      0|        if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME) {
  ------------------
  |  | 1184|      0|  (INT_MAX) /* Must be this for "infinite" setting the work */
  ------------------
  |  Branch (5752:13): [True: 0, False: 0]
  ------------------
 5753|      0|          for (f = 1; f < team->t.t_nproc; ++f) {
  ------------------
  |  Branch (5753:23): [True: 0, False: 0]
  ------------------
 5754|      0|            if (team->t.b->sleep[f].sleep) {
  ------------------
  |  Branch (5754:17): [True: 0, False: 0]
  ------------------
 5755|      0|              __kmp_atomic_resume_64(
 5756|      0|                  team->t.t_threads[f]->th.th_info.ds.ds_gtid,
 5757|      0|                  (kmp_atomic_flag_64<> *)NULL);
 5758|      0|            }
 5759|      0|          }
 5760|      0|        }
 5761|       |        // Wait for threads to be removed from team
 5762|      0|        for (int f = 1; f < team->t.t_nproc; ++f) {
  ------------------
  |  Branch (5762:25): [True: 0, False: 0]
  ------------------
 5763|      0|          while (team->t.t_threads[f]->th.th_used_in_team.load() != 0)
  ------------------
  |  Branch (5763:18): [True: 0, False: 0]
  ------------------
 5764|      0|            KMP_CPU_PAUSE();
  ------------------
  |  | 1498|      0|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  ------------------
 5765|      0|        }
 5766|      0|      }
 5767|      0|    }
 5768|       |
 5769|      2|    for (f = 1; f < team->t.t_nproc; ++f) {
  ------------------
  |  Branch (5769:17): [True: 0, False: 2]
  ------------------
 5770|      0|      team->t.t_threads[f] = NULL;
 5771|      0|    }
 5772|       |
 5773|      2|    if (team->t.t_max_nproc > 1 &&
  ------------------
  |  Branch (5773:9): [True: 1, False: 1]
  ------------------
 5774|      1|        __kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (5774:9): [True: 0, False: 1]
  ------------------
 5775|      0|      distributedBarrier::deallocate(team->t.b);
 5776|      0|      team->t.b = NULL;
 5777|      0|    }
 5778|       |    /* put the team back in the team pool */
 5779|       |    /* TODO limit size of team pool, call reap_team if pool too large */
 5780|      2|    team->t.t_next_pool = CCAST(kmp_team_t *, __kmp_team_pool);
  ------------------
  |  |  229|      2|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5781|      2|    __kmp_team_pool = (volatile kmp_team_t *)team;
 5782|      2|  } else { // Check if team was created for primary threads in teams construct
 5783|       |    // See if first worker is a CG root
 5784|      0|    KMP_DEBUG_ASSERT(team->t.t_threads[1] &&
 5785|      0|                     team->t.t_threads[1]->th.th_cg_roots);
 5786|      0|    if (team->t.t_threads[1]->th.th_cg_roots->cg_root == team->t.t_threads[1]) {
  ------------------
  |  Branch (5786:9): [True: 0, False: 0]
  ------------------
 5787|       |      // Clean up the CG root nodes on workers so that this team can be re-used
 5788|      0|      for (f = 1; f < team->t.t_nproc; ++f) {
  ------------------
  |  Branch (5788:19): [True: 0, False: 0]
  ------------------
 5789|      0|        kmp_info_t *thr = team->t.t_threads[f];
 5790|      0|        KMP_DEBUG_ASSERT(thr && thr->th.th_cg_roots &&
 5791|      0|                         thr->th.th_cg_roots->cg_root == thr);
 5792|       |        // Pop current CG root off list
 5793|      0|        kmp_cg_root_t *tmp = thr->th.th_cg_roots;
 5794|      0|        thr->th.th_cg_roots = tmp->up;
 5795|      0|        KA_TRACE(100, ("__kmp_free_team: Thread %p popping node %p and moving"
 5796|      0|                       " up to node %p. cg_nthreads was %d\n",
 5797|      0|                       thr, tmp, thr->th.th_cg_roots, tmp->cg_nthreads));
 5798|      0|        int i = tmp->cg_nthreads--;
 5799|      0|        if (i == 1) {
  ------------------
  |  Branch (5799:13): [True: 0, False: 0]
  ------------------
 5800|      0|          __kmp_free(tmp); // free CG if we are the last thread in it
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 5801|      0|        }
 5802|       |        // Restore current task's thread_limit from CG root
 5803|      0|        if (thr->th.th_cg_roots)
  ------------------
  |  Branch (5803:13): [True: 0, False: 0]
  ------------------
 5804|      0|          thr->th.th_current_task->td_icvs.thread_limit =
 5805|      0|              thr->th.th_cg_roots->cg_thread_limit;
 5806|      0|      }
 5807|      0|    }
 5808|      0|  }
 5809|       |
 5810|      2|  KMP_MB();
 5811|      2|}
__kmp_reap_team:
 5814|      3|kmp_team_t *__kmp_reap_team(kmp_team_t *team) {
 5815|      3|  kmp_team_t *next_pool = team->t.t_next_pool;
 5816|       |
 5817|      3|  KMP_DEBUG_ASSERT(team);
 5818|      3|  KMP_DEBUG_ASSERT(team->t.t_dispatch);
 5819|      3|  KMP_DEBUG_ASSERT(team->t.t_disp_buffer);
 5820|      3|  KMP_DEBUG_ASSERT(team->t.t_threads);
 5821|      3|  KMP_DEBUG_ASSERT(team->t.t_argv);
 5822|       |
 5823|       |  /* TODO clean the threads that are a part of this? */
 5824|       |
 5825|       |  /* free stuff */
 5826|      3|  __kmp_free_team_arrays(team);
 5827|      3|  if (team->t.t_argv != &team->t.t_inline_argv[0])
  ------------------
  |  Branch (5827:7): [True: 0, False: 3]
  ------------------
 5828|      0|    __kmp_free((void *)team->t.t_argv);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 5829|      3|  __kmp_free(team);
  ------------------
  |  | 3619|      3|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 5830|       |
 5831|      3|  KMP_MB();
 5832|      3|  return next_pool;
 5833|      3|}
__kmp_internal_end_atexit:
 6129|      1|void __kmp_internal_end_atexit(void) {
 6130|      1|  KA_TRACE(30, ("__kmp_internal_end_atexit\n"));
 6131|       |  /* [Windows]
 6132|       |     josh: ideally, we want to completely shutdown the library in this atexit
 6133|       |     handler, but stat code that depends on thread specific data for gtid fails
 6134|       |     because that data becomes unavailable at some point during the shutdown, so
 6135|       |     we call __kmp_internal_end_thread instead. We should eventually remove the
 6136|       |     dependency on __kmp_get_specific_gtid in the stat code and use
 6137|       |     __kmp_internal_end_library to cleanly shutdown the library.
 6138|       |
 6139|       |     // TODO: Can some of this comment about GVS be removed?
 6140|       |     I suspect that the offending stat code is executed when the calling thread
 6141|       |     tries to clean up a dead root thread's data structures, resulting in GVS
 6142|       |     code trying to close the GVS structures for that thread, but since the stat
 6143|       |     code uses __kmp_get_specific_gtid to get the gtid with the assumption that
 6144|       |     the calling thread is cleaning up itself instead of another thread, it get
 6145|       |     confused. This happens because allowing a thread to unregister and cleanup
 6146|       |     another thread is a recent modification for addressing an issue.
 6147|       |     Based on the current design (20050722), a thread may end up
 6148|       |     trying to unregister another thread only if thread death does not trigger
 6149|       |     the calling of __kmp_internal_end_thread.  For Linux* OS, there is the
 6150|       |     thread specific data destructor function to detect thread death. For
 6151|       |     Windows dynamic, there is DllMain(THREAD_DETACH). For Windows static, there
 6152|       |     is nothing.  Thus, the workaround is applicable only for Windows static
 6153|       |     stat library. */
 6154|      1|  __kmp_internal_end_library(-1);
 6155|       |#if KMP_OS_WINDOWS
 6156|       |  __kmp_close_console();
 6157|       |#endif
 6158|      1|}
__kmp_internal_end_library:
 6436|      1|void __kmp_internal_end_library(int gtid_req) {
 6437|       |  /* if we have already cleaned up, don't try again, it wouldn't be pretty */
 6438|       |  /* this shouldn't be a race condition because __kmp_internal_end() is the
 6439|       |     only place to clear __kmp_serial_init */
 6440|       |  /* we'll check this later too, after we get the lock */
 6441|       |  // 2009-09-06: We do not set g_abort without setting g_done. This check looks
 6442|       |  // redundant, because the next check will work in any case.
 6443|      1|  if (__kmp_global.g.g_abort) {
  ------------------
  |  Branch (6443:7): [True: 0, False: 1]
  ------------------
 6444|      0|    KA_TRACE(11, ("__kmp_internal_end_library: abort, exiting\n"));
 6445|       |    /* TODO abort? */
 6446|      0|    return;
 6447|      0|  }
 6448|      1|  if (TCR_4(__kmp_global.g.g_done) || !__kmp_init_serial) {
  ------------------
  |  | 1127|      2|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (6448:39): [True: 0, False: 1]
  ------------------
 6449|      0|    KA_TRACE(10, ("__kmp_internal_end_library: already finished\n"));
 6450|      0|    return;
 6451|      0|  }
 6452|       |
 6453|       |  // If hidden helper team has been initialized, we need to deinit it
 6454|      1|  if (TCR_4(__kmp_init_hidden_helper) &&
  ------------------
  |  | 1127|      2|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 6455|      0|      !TCR_4(__kmp_hidden_helper_team_done)) {
  ------------------
  |  | 1127|      0|#define TCR_4(a) (a)
  ------------------
  |  Branch (6455:7): [True: 0, False: 0]
  ------------------
 6456|      0|    TCW_SYNC_4(__kmp_hidden_helper_team_done, TRUE);
  ------------------
  |  | 1136|      0|#define TCW_SYNC_4(a, b) (a) = (b)
  ------------------
 6457|       |    // First release the main thread to let it continue its work
 6458|      0|    __kmp_hidden_helper_main_thread_release();
 6459|       |    // Wait until the hidden helper team has been destroyed
 6460|      0|    __kmp_hidden_helper_threads_deinitz_wait();
 6461|      0|  }
 6462|       |
 6463|      1|  KMP_MB(); /* Flush all pending memory write invalidates.  */
 6464|       |  /* find out who we are and what we should do */
 6465|      1|  {
 6466|      1|    int gtid = (gtid_req >= 0) ? gtid_req : __kmp_gtid_get_specific();
  ------------------
  |  Branch (6466:16): [True: 0, False: 1]
  ------------------
 6467|      1|    KA_TRACE(
 6468|      1|        10, ("__kmp_internal_end_library: enter T#%d  (%d)\n", gtid, gtid_req));
 6469|      1|    if (gtid == KMP_GTID_SHUTDOWN) {
  ------------------
  |  | 1001|      1|#define KMP_GTID_SHUTDOWN (-3) /* Library is shutting down */
  ------------------
  |  Branch (6469:9): [True: 0, False: 1]
  ------------------
 6470|      0|      KA_TRACE(10, ("__kmp_internal_end_library: !__kmp_init_runtime, system "
 6471|      0|                    "already shutdown\n"));
 6472|      0|      return;
 6473|      1|    } else if (gtid == KMP_GTID_MONITOR) {
  ------------------
  |  | 1002|      1|#define KMP_GTID_MONITOR (-4) /* Monitor thread ID */
  ------------------
  |  Branch (6473:16): [True: 0, False: 1]
  ------------------
 6474|      0|      KA_TRACE(10, ("__kmp_internal_end_library: monitor thread, gtid not "
 6475|      0|                    "registered, or system shutdown\n"));
 6476|      0|      return;
 6477|      1|    } else if (gtid == KMP_GTID_DNE) {
  ------------------
  |  | 1000|      1|#define KMP_GTID_DNE (-2) /* Does not exist */
  ------------------
  |  Branch (6477:16): [True: 0, False: 1]
  ------------------
 6478|      0|      KA_TRACE(10, ("__kmp_internal_end_library: gtid not registered or system "
 6479|      0|                    "shutdown\n"));
 6480|       |      /* we don't know who we are, but we may still shutdown the library */
 6481|      1|    } else if (KMP_UBER_GTID(gtid)) {
  ------------------
  |  Branch (6481:16): [True: 1, False: 0]
  ------------------
 6482|       |      /* unregister ourselves as an uber thread.  gtid is no longer valid */
 6483|      1|      if (__kmp_root[gtid]->r.r_active) {
  ------------------
  |  Branch (6483:11): [True: 0, False: 1]
  ------------------
 6484|      0|        __kmp_global.g.g_abort = -1;
 6485|      0|        TCW_SYNC_4(__kmp_global.g.g_done, TRUE);
  ------------------
  |  | 1136|      0|#define TCW_SYNC_4(a, b) (a) = (b)
  ------------------
 6486|      0|        __kmp_unregister_library();
 6487|      0|        KA_TRACE(10,
 6488|      0|                 ("__kmp_internal_end_library: root still active, abort T#%d\n",
 6489|      0|                  gtid));
 6490|      0|        return;
 6491|      1|      } else {
 6492|      1|        __kmp_itthash_clean(__kmp_threads[gtid]);
 6493|      1|        KA_TRACE(
 6494|      1|            10,
 6495|      1|            ("__kmp_internal_end_library: unregistering sibling T#%d\n", gtid));
 6496|      1|        __kmp_unregister_root_current_thread(gtid);
 6497|      1|      }
 6498|      1|    } else {
 6499|       |/* worker threads may call this function through the atexit handler, if they
 6500|       | * call exit() */
 6501|       |/* For now, skip the usual subsequent processing and just dump the debug buffer.
 6502|       |   TODO: do a thorough shutdown instead */
 6503|       |#ifdef DUMP_DEBUG_ON_EXIT
 6504|       |      if (__kmp_debug_buf)
 6505|       |        __kmp_dump_debug_buffer();
 6506|       |#endif
 6507|       |      // added unregister library call here when we switch to shm linux
 6508|       |      // if we don't, it will leave lots of files in /dev/shm
 6509|       |      // cleanup shared memory file before exiting.
 6510|      0|      __kmp_unregister_library();
 6511|      0|      return;
 6512|      0|    }
 6513|      1|  }
 6514|       |  /* synchronize the termination process */
 6515|      1|  __kmp_acquire_bootstrap_lock(&__kmp_initz_lock);
 6516|       |
 6517|       |  /* have we already finished */
 6518|      1|  if (__kmp_global.g.g_abort) {
  ------------------
  |  Branch (6518:7): [True: 0, False: 1]
  ------------------
 6519|      0|    KA_TRACE(10, ("__kmp_internal_end_library: abort, exiting\n"));
 6520|       |    /* TODO abort? */
 6521|      0|    __kmp_release_bootstrap_lock(&__kmp_initz_lock);
 6522|      0|    return;
 6523|      0|  }
 6524|      1|  if (TCR_4(__kmp_global.g.g_done) || !__kmp_init_serial) {
  ------------------
  |  | 1127|      2|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (6524:39): [True: 0, False: 1]
  ------------------
 6525|      0|    __kmp_release_bootstrap_lock(&__kmp_initz_lock);
 6526|      0|    return;
 6527|      0|  }
 6528|       |
 6529|       |  /* We need this lock to enforce mutex between this reading of
 6530|       |     __kmp_threads_capacity and the writing by __kmp_register_root.
 6531|       |     Alternatively, we can use a counter of roots that is atomically updated by
 6532|       |     __kmp_get_global_thread_id_reg, __kmp_do_serial_initialize and
 6533|       |     __kmp_internal_end_*.  */
 6534|      1|  __kmp_acquire_bootstrap_lock(&__kmp_forkjoin_lock);
 6535|       |
 6536|       |  /* now we can safely conduct the actual termination */
 6537|      1|  __kmp_internal_end();
 6538|       |
 6539|      1|  __kmp_release_bootstrap_lock(&__kmp_forkjoin_lock);
 6540|      1|  __kmp_release_bootstrap_lock(&__kmp_initz_lock);
 6541|       |
 6542|      1|  KA_TRACE(10, ("__kmp_internal_end_library: exit\n"));
 6543|       |
 6544|       |#ifdef DUMP_DEBUG_ON_EXIT
 6545|       |  if (__kmp_debug_buf)
 6546|       |    __kmp_dump_debug_buffer();
 6547|       |#endif
 6548|       |
 6549|       |#if KMP_OS_WINDOWS
 6550|       |  __kmp_close_console();
 6551|       |#endif
 6552|       |
 6553|      1|  __kmp_fini_allocator();
 6554|       |
 6555|      1|} // __kmp_internal_end_library
_Z30__kmp_register_library_startupv:
 6720|      1|void __kmp_register_library_startup(void) {
 6721|       |
 6722|      1|  char *name = __kmp_reg_status_name(); // Name of the environment variable.
 6723|      1|  int done = 0;
 6724|      1|  union {
 6725|      1|    double dtime;
 6726|      1|    long ltime;
 6727|      1|  } time;
 6728|      1|#if KMP_ARCH_X86 || KMP_ARCH_X86_64
 6729|      1|  __kmp_initialize_system_tick();
 6730|      1|#endif
 6731|      1|  __kmp_read_system_time(&time.dtime);
 6732|      1|  __kmp_registration_flag = 0xCAFE0000L | (time.ltime & 0x0000FFFFL);
 6733|      1|  __kmp_registration_str =
 6734|      1|      __kmp_str_format("%p-%lx-%s", &__kmp_registration_flag,
 6735|      1|                       __kmp_registration_flag, KMP_LIBRARY_FILE);
  ------------------
  |  |   70|      1|#define KMP_LIBRARY_FILE "libomp.a"
  ------------------
 6736|       |
 6737|      1|  KA_TRACE(50, ("__kmp_register_library_startup: %s=\"%s\"\n", name,
 6738|      1|                __kmp_registration_str));
 6739|       |
 6740|      2|  while (!done) {
  ------------------
  |  Branch (6740:10): [True: 1, False: 1]
  ------------------
 6741|       |
 6742|      1|    char *value = NULL; // Actual value of the environment variable.
 6743|       |
 6744|       |#if defined(KMP_USE_SHM)
 6745|       |    char *shm_name = __kmp_str_format("/%s", name);
 6746|       |    int shm_preexist = 0;
 6747|       |    char *data1;
 6748|       |    int fd1 = shm_open(shm_name, O_CREAT | O_EXCL | O_RDWR, 0666);
 6749|       |    if ((fd1 == -1) && (errno == EEXIST)) {
 6750|       |      // file didn't open because it already exists.
 6751|       |      // try opening existing file
 6752|       |      fd1 = shm_open(shm_name, O_RDWR, 0666);
 6753|       |      if (fd1 == -1) { // file didn't open
 6754|       |        // error out here
 6755|       |        __kmp_fatal(KMP_MSG(FunctionError, "Can't open SHM"), KMP_ERR(0),
 6756|       |                    __kmp_msg_null);
 6757|       |      } else {
 6758|       |        // able to open existing file
 6759|       |        shm_preexist = 1;
 6760|       |      }
 6761|       |    } else if (fd1 == -1) {
 6762|       |      // SHM didn't open; it was due to error other than already exists. Try to
 6763|       |      // create a temp file under /tmp.
 6764|       |      // TODO: /tmp might not always be the temporary directory. For now we will
 6765|       |      // not consider TMPDIR. If /tmp is not accessible, we simply error out.
 6766|       |      char *temp_file_name = __kmp_str_format("/tmp/%sXXXXXX", name);
 6767|       |      fd1 = mkstemp(temp_file_name);
 6768|       |      if (fd1 == -1) {
 6769|       |        // error out here.
 6770|       |        __kmp_fatal(KMP_MSG(FunctionError, "Can't open TEMP"), KMP_ERR(errno),
 6771|       |                    __kmp_msg_null);
 6772|       |      }
 6773|       |      temp_reg_status_file_name = temp_file_name;
 6774|       |    }
 6775|       |    if (shm_preexist == 0) {
 6776|       |      // we created SHM now set size
 6777|       |      if (ftruncate(fd1, SHM_SIZE) == -1) {
 6778|       |        // error occured setting size;
 6779|       |        __kmp_fatal(KMP_MSG(FunctionError, "Can't set size of SHM"),
 6780|       |                    KMP_ERR(errno), __kmp_msg_null);
 6781|       |      }
 6782|       |    }
 6783|       |    data1 =
 6784|       |        (char *)mmap(0, SHM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd1, 0);
 6785|       |    if (data1 == MAP_FAILED) {
 6786|       |      // failed to map shared memory
 6787|       |      __kmp_fatal(KMP_MSG(FunctionError, "Can't map SHM"), KMP_ERR(errno),
 6788|       |                  __kmp_msg_null);
 6789|       |    }
 6790|       |    if (shm_preexist == 0) { // set data to SHM, set value
 6791|       |      KMP_STRCPY_S(data1, SHM_SIZE, __kmp_registration_str);
 6792|       |    }
 6793|       |    // Read value from either what we just wrote or existing file.
 6794|       |    value = __kmp_str_format("%s", data1); // read value from SHM
 6795|       |    munmap(data1, SHM_SIZE);
 6796|       |    close(fd1);
 6797|       |#else // Windows and unix with static library
 6798|       |    // Set environment variable, but do not overwrite if it is exist.
 6799|      1|    __kmp_env_set(name, __kmp_registration_str, 0);
 6800|       |    // read value to see if it got set
 6801|      1|    value = __kmp_env_get(name);
 6802|      1|#endif
 6803|       |
 6804|      1|    if (value != NULL && strcmp(value, __kmp_registration_str) == 0) {
  ------------------
  |  Branch (6804:9): [True: 1, False: 0]
  |  Branch (6804:26): [True: 1, False: 0]
  ------------------
 6805|      1|      done = 1; // Ok, environment variable set successfully, exit the loop.
 6806|      1|    } else {
 6807|       |      // Oops. Write failed. Another copy of OpenMP RTL is in memory.
 6808|       |      // Check whether it alive or dead.
 6809|      0|      int neighbor = 0; // 0 -- unknown status, 1 -- alive, 2 -- dead.
 6810|      0|      char *tail = value;
 6811|      0|      char *flag_addr_str = NULL;
 6812|      0|      char *flag_val_str = NULL;
 6813|      0|      char const *file_name = NULL;
 6814|      0|      __kmp_str_split(tail, '-', &flag_addr_str, &tail);
 6815|      0|      __kmp_str_split(tail, '-', &flag_val_str, &tail);
 6816|      0|      file_name = tail;
 6817|      0|      if (tail != NULL) {
  ------------------
  |  Branch (6817:11): [True: 0, False: 0]
  ------------------
 6818|      0|        unsigned long *flag_addr = 0;
 6819|      0|        unsigned long flag_val = 0;
 6820|      0|        KMP_SSCANF(flag_addr_str, "%p", RCAST(void **, &flag_addr));
  ------------------
  |  |   62|      0|#define KMP_SSCANF sscanf
  ------------------
                      KMP_SSCANF(flag_addr_str, "%p", RCAST(void **, &flag_addr));
  ------------------
  |  |  230|      0|#define RCAST(type, var) reinterpret_cast<type>(var)
  ------------------
 6821|      0|        KMP_SSCANF(flag_val_str, "%lx", &flag_val);
  ------------------
  |  |   62|      0|#define KMP_SSCANF sscanf
  ------------------
 6822|      0|        if (flag_addr != 0 && flag_val != 0 && strcmp(file_name, "") != 0) {
  ------------------
  |  Branch (6822:13): [True: 0, False: 0]
  |  Branch (6822:31): [True: 0, False: 0]
  |  Branch (6822:48): [True: 0, False: 0]
  ------------------
 6823|       |          // First, check whether environment-encoded address is mapped into
 6824|       |          // addr space.
 6825|       |          // If so, dereference it to see if it still has the right value.
 6826|      0|          if (__kmp_is_address_mapped(flag_addr) && *flag_addr == flag_val) {
  ------------------
  |  Branch (6826:15): [True: 0, False: 0]
  |  Branch (6826:53): [True: 0, False: 0]
  ------------------
 6827|      0|            neighbor = 1;
 6828|      0|          } else {
 6829|       |            // If not, then we know the other copy of the library is no longer
 6830|       |            // running.
 6831|      0|            neighbor = 2;
 6832|      0|          }
 6833|      0|        }
 6834|      0|      }
 6835|      0|      switch (neighbor) {
 6836|      0|      case 0: // Cannot parse environment variable -- neighbor status unknown.
  ------------------
  |  Branch (6836:7): [True: 0, False: 0]
  ------------------
 6837|       |        // Assume it is the incompatible format of future version of the
 6838|       |        // library. Assume the other library is alive.
 6839|       |        // WARN( ... ); // TODO: Issue a warning.
 6840|      0|        file_name = "unknown library";
 6841|      0|        KMP_FALLTHROUGH();
  ------------------
  |  |  347|      0|#define KMP_FALLTHROUGH() [[fallthrough]]
  ------------------
 6842|       |      // Attention! Falling to the next case. That's intentional.
 6843|      0|      case 1: { // Neighbor is alive.
  ------------------
  |  Branch (6843:7): [True: 0, False: 0]
  ------------------
 6844|       |        // Check it is allowed.
 6845|      0|        char *duplicate_ok = __kmp_env_get("KMP_DUPLICATE_LIB_OK");
 6846|      0|        if (!__kmp_str_match_true(duplicate_ok)) {
  ------------------
  |  Branch (6846:13): [True: 0, False: 0]
  ------------------
 6847|       |          // That's not allowed. Issue fatal error.
 6848|      0|          __kmp_fatal(KMP_MSG(DuplicateLibrary, KMP_LIBRARY_FILE, file_name),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  |  |  |  | 6848|      0|          __kmp_fatal(KMP_MSG(DuplicateLibrary, KMP_LIBRARY_FILE, file_name),
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define KMP_LIBRARY_FILE "libomp.a"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6849|      0|                      KMP_HNT(DuplicateLibrary), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
 6850|      0|        }
 6851|      0|        KMP_INTERNAL_FREE(duplicate_ok);
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 6852|      0|        __kmp_duplicate_library_ok = 1;
 6853|      0|        done = 1; // Exit the loop.
 6854|      0|      } break;
 6855|      0|      case 2: { // Neighbor is dead.
  ------------------
  |  Branch (6855:7): [True: 0, False: 0]
  ------------------
 6856|       |
 6857|       |#if defined(KMP_USE_SHM)
 6858|       |        // close shared memory.
 6859|       |        shm_unlink(shm_name); // this removes file in /dev/shm
 6860|       |#else
 6861|       |        // Clear the variable and try to register library again.
 6862|      0|        __kmp_env_unset(name);
 6863|      0|#endif
 6864|      0|      } break;
 6865|      0|      default: {
  ------------------
  |  Branch (6865:7): [True: 0, False: 0]
  ------------------
 6866|      0|        KMP_DEBUG_ASSERT(0);
 6867|      0|      } break;
 6868|      0|      }
 6869|      0|    }
 6870|      1|    KMP_INTERNAL_FREE((void *)value);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 6871|       |#if defined(KMP_USE_SHM)
 6872|       |    KMP_INTERNAL_FREE((void *)shm_name);
 6873|       |#endif
 6874|      1|  } // while
 6875|      1|  KMP_INTERNAL_FREE((void *)name);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 6876|       |
 6877|      1|} // func __kmp_register_library_startup
__kmp_unregister_library:
 6879|      1|void __kmp_unregister_library(void) {
 6880|       |
 6881|      1|  char *name = __kmp_reg_status_name();
 6882|      1|  char *value = NULL;
 6883|       |
 6884|       |#if defined(KMP_USE_SHM)
 6885|       |  bool use_shm = true;
 6886|       |  char *shm_name = __kmp_str_format("/%s", name);
 6887|       |  int fd1 = shm_open(shm_name, O_RDONLY, 0666);
 6888|       |  if (fd1 == -1) {
 6889|       |    // File did not open. Try the temporary file.
 6890|       |    use_shm = false;
 6891|       |    KMP_DEBUG_ASSERT(temp_reg_status_file_name);
 6892|       |    fd1 = open(temp_reg_status_file_name, O_RDONLY);
 6893|       |    if (fd1 == -1) {
 6894|       |      // give it up now.
 6895|       |      return;
 6896|       |    }
 6897|       |  }
 6898|       |  char *data1 = (char *)mmap(0, SHM_SIZE, PROT_READ, MAP_SHARED, fd1, 0);
 6899|       |  if (data1 != MAP_FAILED) {
 6900|       |    value = __kmp_str_format("%s", data1); // read value from SHM
 6901|       |    munmap(data1, SHM_SIZE);
 6902|       |  }
 6903|       |  close(fd1);
 6904|       |#else
 6905|      1|  value = __kmp_env_get(name);
 6906|      1|#endif
 6907|       |
 6908|      1|  KMP_DEBUG_ASSERT(__kmp_registration_flag != 0);
 6909|      1|  KMP_DEBUG_ASSERT(__kmp_registration_str != NULL);
 6910|      1|  if (value != NULL && strcmp(value, __kmp_registration_str) == 0) {
  ------------------
  |  Branch (6910:7): [True: 1, False: 0]
  |  Branch (6910:24): [True: 1, False: 0]
  ------------------
 6911|       |//  Ok, this is our variable. Delete it.
 6912|       |#if defined(KMP_USE_SHM)
 6913|       |    if (use_shm) {
 6914|       |      shm_unlink(shm_name); // this removes file in /dev/shm
 6915|       |    } else {
 6916|       |      KMP_DEBUG_ASSERT(temp_reg_status_file_name);
 6917|       |      unlink(temp_reg_status_file_name); // this removes the temp file
 6918|       |    }
 6919|       |#else
 6920|      1|    __kmp_env_unset(name);
 6921|      1|#endif
 6922|      1|  }
 6923|       |
 6924|       |#if defined(KMP_USE_SHM)
 6925|       |  KMP_INTERNAL_FREE(shm_name);
 6926|       |  if (!use_shm) {
 6927|       |    KMP_DEBUG_ASSERT(temp_reg_status_file_name);
 6928|       |    KMP_INTERNAL_FREE(temp_reg_status_file_name);
 6929|       |  }
 6930|       |#endif
 6931|       |
 6932|      1|  KMP_INTERNAL_FREE(__kmp_registration_str);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 6933|      1|  KMP_INTERNAL_FREE(value);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 6934|      1|  KMP_INTERNAL_FREE(name);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 6935|       |
 6936|      1|  __kmp_registration_flag = 0;
 6937|      1|  __kmp_registration_str = NULL;
 6938|       |
 6939|      1|} // __kmp_unregister_library
__kmp_cleanup:
 8157|      1|void __kmp_cleanup(void) {
 8158|      1|  int f;
 8159|       |
 8160|      1|  KA_TRACE(10, ("__kmp_cleanup: enter\n"));
 8161|       |
 8162|      1|  if (TCR_4(__kmp_init_parallel)) {
  ------------------
  |  | 1127|      1|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 8163|      0|#if KMP_HANDLE_SIGNALS
 8164|      0|    __kmp_remove_signals();
 8165|      0|#endif
 8166|      0|    TCW_4(__kmp_init_parallel, FALSE);
  ------------------
  |  | 1128|      0|#define TCW_4(a, b) (a) = (b)
  ------------------
 8167|      0|  }
 8168|       |
 8169|      1|  if (TCR_4(__kmp_init_middle)) {
  ------------------
  |  | 1127|      1|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 8170|      0|#if KMP_AFFINITY_SUPPORTED
 8171|      0|    __kmp_affinity_uninitialize();
 8172|      0|#endif /* KMP_AFFINITY_SUPPORTED */
 8173|      0|    __kmp_cleanup_hierarchy();
 8174|      0|    TCW_4(__kmp_init_middle, FALSE);
  ------------------
  |  | 1128|      0|#define TCW_4(a, b) (a) = (b)
  ------------------
 8175|      0|  }
 8176|       |
 8177|      1|  KA_TRACE(10, ("__kmp_cleanup: go serial cleanup\n"));
 8178|       |
 8179|      1|  if (__kmp_init_serial) {
  ------------------
  |  Branch (8179:7): [True: 1, False: 0]
  ------------------
 8180|      1|    __kmp_runtime_destroy();
 8181|      1|    __kmp_init_serial = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 8182|      1|  }
 8183|       |
 8184|      1|  __kmp_cleanup_threadprivate_caches();
 8185|       |
 8186|    137|  for (f = 0; f < __kmp_threads_capacity; f++) {
  ------------------
  |  Branch (8186:15): [True: 136, False: 1]
  ------------------
 8187|    136|    if (__kmp_root[f] != NULL) {
  ------------------
  |  Branch (8187:9): [True: 1, False: 135]
  ------------------
 8188|      1|      __kmp_free(__kmp_root[f]);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 8189|      1|      __kmp_root[f] = NULL;
 8190|      1|    }
 8191|    136|  }
 8192|      1|  __kmp_free(__kmp_threads);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 8193|       |  // __kmp_threads and __kmp_root were allocated at once, as single block, so
 8194|       |  // there is no need in freeing __kmp_root.
 8195|      1|  __kmp_threads = NULL;
 8196|      1|  __kmp_root = NULL;
 8197|      1|  __kmp_threads_capacity = 0;
 8198|       |
 8199|       |  // Free old __kmp_threads arrays if they exist.
 8200|      1|  kmp_old_threads_list_t *ptr = __kmp_old_threads_list;
 8201|      1|  while (ptr) {
  ------------------
  |  Branch (8201:10): [True: 0, False: 1]
  ------------------
 8202|      0|    kmp_old_threads_list_t *next = ptr->next;
 8203|      0|    __kmp_free(ptr->threads);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 8204|      0|    __kmp_free(ptr);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 8205|      0|    ptr = next;
 8206|      0|  }
 8207|       |
 8208|      1|#if KMP_USE_DYNAMIC_LOCK
 8209|      1|  __kmp_cleanup_indirect_user_locks();
 8210|       |#else
 8211|       |  __kmp_cleanup_user_locks();
 8212|       |#endif
 8213|      1|#if OMPD_SUPPORT
 8214|      1|  if (ompd_state) {
  ------------------
  |  Branch (8214:7): [True: 0, False: 1]
  ------------------
 8215|      0|    __kmp_free(ompd_env_block);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 8216|      0|    ompd_env_block = NULL;
 8217|      0|    ompd_env_block_size = 0;
 8218|      0|  }
 8219|      1|#endif
 8220|       |
 8221|      1|#if KMP_AFFINITY_SUPPORTED
 8222|      1|  KMP_INTERNAL_FREE(CCAST(char *, __kmp_cpuinfo_file));
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 8223|      1|  __kmp_cpuinfo_file = NULL;
 8224|      1|#endif /* KMP_AFFINITY_SUPPORTED */
 8225|       |
 8226|      1|#if KMP_USE_ADAPTIVE_LOCKS
 8227|       |#if KMP_DEBUG_ADAPTIVE_LOCKS
 8228|       |  __kmp_print_speculative_stats();
 8229|       |#endif
 8230|      1|#endif
 8231|      1|  KMP_INTERNAL_FREE(__kmp_nested_nth.nth);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 8232|      1|  __kmp_nested_nth.nth = NULL;
 8233|      1|  __kmp_nested_nth.size = 0;
 8234|      1|  __kmp_nested_nth.used = 0;
 8235|      1|  KMP_INTERNAL_FREE(__kmp_nested_proc_bind.bind_types);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 8236|      1|  __kmp_nested_proc_bind.bind_types = NULL;
 8237|      1|  __kmp_nested_proc_bind.size = 0;
 8238|      1|  __kmp_nested_proc_bind.used = 0;
 8239|      1|  if (__kmp_affinity_format) {
  ------------------
  |  Branch (8239:7): [True: 1, False: 0]
  ------------------
 8240|      1|    KMP_INTERNAL_FREE(__kmp_affinity_format);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
 8241|      1|    __kmp_affinity_format = NULL;
 8242|      1|  }
 8243|       |
 8244|      1|  __kmp_i18n_catclose();
 8245|       |
 8246|       |#if KMP_USE_HIER_SCHED
 8247|       |  __kmp_hier_scheds.deallocate();
 8248|       |#endif
 8249|       |
 8250|       |#if KMP_STATS_ENABLED
 8251|       |  __kmp_stats_fini();
 8252|       |#endif
 8253|       |
 8254|      1|  KA_TRACE(10, ("__kmp_cleanup: exit\n"));
 8255|      1|}
_Z23__kmp_init_nesting_modev:
 9193|      1|void __kmp_init_nesting_mode() {
 9194|      1|  int levels = KMP_HW_LAST;
 9195|      1|  __kmp_nesting_mode_nlevels = levels;
 9196|      1|  __kmp_nesting_nth_level = (int *)KMP_INTERNAL_MALLOC(levels * sizeof(int));
  ------------------
  |  |  110|      1|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
 9197|     13|  for (int i = 0; i < levels; ++i)
  ------------------
  |  Branch (9197:19): [True: 12, False: 1]
  ------------------
 9198|     12|    __kmp_nesting_nth_level[i] = 0;
 9199|      1|  if (__kmp_nested_nth.size < levels) {
  ------------------
  |  Branch (9199:7): [True: 1, False: 0]
  ------------------
 9200|      1|    __kmp_nested_nth.nth =
 9201|      1|        (int *)KMP_INTERNAL_REALLOC(__kmp_nested_nth.nth, levels * sizeof(int));
  ------------------
  |  |  112|      1|#define KMP_INTERNAL_REALLOC(p, sz) realloc((p), (sz))
  ------------------
 9202|      1|    __kmp_nested_nth.size = levels;
 9203|      1|  }
 9204|      1|}
kmp_runtime.cpp:_ZL21__kmp_initialize_rootP8kmp_root:
 3317|      1|static void __kmp_initialize_root(kmp_root_t *root) {
 3318|      1|  int f;
 3319|      1|  kmp_team_t *root_team;
 3320|      1|  kmp_team_t *hot_team;
 3321|      1|  int hot_team_max_nth;
 3322|      1|  kmp_r_sched_t r_sched =
 3323|      1|      __kmp_get_schedule_global(); // get current state of scheduling globals
 3324|      1|  kmp_internal_control_t r_icvs = __kmp_get_global_icvs();
 3325|      1|  KMP_DEBUG_ASSERT(root);
 3326|      1|  KMP_ASSERT(!root->r.r_begin);
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 3327|       |
 3328|       |  /* setup the root state structure */
 3329|      1|  __kmp_init_lock(&root->r.r_begin_lock);
 3330|      1|  root->r.r_begin = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 3331|      1|  root->r.r_active = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 3332|      1|  root->r.r_in_parallel = 0;
 3333|      1|  root->r.r_blocktime = __kmp_dflt_blocktime;
 3334|      1|#if KMP_AFFINITY_SUPPORTED
 3335|      1|  root->r.r_affinity_assigned = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 3336|      1|#endif
 3337|       |
 3338|       |  /* setup the root team for this task */
 3339|       |  /* allocate the root team structure */
 3340|      1|  KF_TRACE(10, ("__kmp_initialize_root: before root_team\n"));
 3341|       |
 3342|      1|  root_team =
 3343|      1|      __kmp_allocate_team(root,
 3344|      1|                          1, // new_nproc
 3345|      1|                          1, // max_nproc
 3346|      1|#if OMPT_SUPPORT
 3347|      1|                          ompt_data_none, // root parallel id
  ------------------
  |  | 1408|      1|#define ompt_data_none {0}
  ------------------
 3348|      1|#endif
 3349|      1|                          __kmp_nested_proc_bind.bind_types[0], &r_icvs,
 3350|      1|                          0 // argc
 3351|      1|                          USE_NESTED_HOT_ARG(NULL) // primary thread is unknown
  ------------------
  |  |  165|      1|#define USE_NESTED_HOT_ARG(x) , x
  ------------------
 3352|      1|      );
 3353|       |#if USE_DEBUGGER
 3354|       |  // Non-NULL value should be assigned to make the debugger display the root
 3355|       |  // team.
 3356|       |  TCW_SYNC_PTR(root_team->t.t_pkfn, (microtask_t)(~0));
 3357|       |#endif
 3358|       |
 3359|      1|  KF_TRACE(10, ("__kmp_initialize_root: after root_team = %p\n", root_team));
 3360|       |
 3361|      1|  root->r.r_root_team = root_team;
 3362|      1|  root_team->t.t_control_stack_top = NULL;
 3363|       |
 3364|       |  /* initialize root team */
 3365|      1|  root_team->t.t_threads[0] = NULL;
 3366|      1|  root_team->t.t_nproc = 1;
 3367|      1|  root_team->t.t_serialized = 1;
 3368|       |  // TODO???: root_team->t.t_max_active_levels = __kmp_dflt_max_active_levels;
 3369|      1|  root_team->t.t_sched.sched = r_sched.sched;
 3370|      1|  KA_TRACE(
 3371|      1|      20,
 3372|      1|      ("__kmp_initialize_root: init root team %d arrived: join=%u, plain=%u\n",
 3373|      1|       root_team->t.t_id, KMP_INIT_BARRIER_STATE, KMP_INIT_BARRIER_STATE));
 3374|       |
 3375|       |  /* setup the  hot team for this task */
 3376|       |  /* allocate the hot team structure */
 3377|      1|  KF_TRACE(10, ("__kmp_initialize_root: before hot_team\n"));
 3378|       |
 3379|      1|  hot_team =
 3380|      1|      __kmp_allocate_team(root,
 3381|      1|                          1, // new_nproc
 3382|      1|                          __kmp_dflt_team_nth_ub * 2, // max_nproc
 3383|      1|#if OMPT_SUPPORT
 3384|      1|                          ompt_data_none, // root parallel id
  ------------------
  |  | 1408|      1|#define ompt_data_none {0}
  ------------------
 3385|      1|#endif
 3386|      1|                          __kmp_nested_proc_bind.bind_types[0], &r_icvs,
 3387|      1|                          0 // argc
 3388|      1|                          USE_NESTED_HOT_ARG(NULL) // primary thread is unknown
  ------------------
  |  |  165|      1|#define USE_NESTED_HOT_ARG(x) , x
  ------------------
 3389|      1|      );
 3390|      1|  KF_TRACE(10, ("__kmp_initialize_root: after hot_team = %p\n", hot_team));
 3391|       |
 3392|      1|  root->r.r_hot_team = hot_team;
 3393|      1|  root_team->t.t_control_stack_top = NULL;
 3394|       |
 3395|       |  /* first-time initialization */
 3396|      1|  hot_team->t.t_parent = root_team;
 3397|       |
 3398|       |  /* initialize hot team */
 3399|      1|  hot_team_max_nth = hot_team->t.t_max_nproc;
 3400|     65|  for (f = 0; f < hot_team_max_nth; ++f) {
  ------------------
  |  Branch (3400:15): [True: 64, False: 1]
  ------------------
 3401|     64|    hot_team->t.t_threads[f] = NULL;
 3402|     64|  }
 3403|      1|  hot_team->t.t_nproc = 1;
 3404|       |  // TODO???: hot_team->t.t_max_active_levels = __kmp_dflt_max_active_levels;
 3405|      1|  hot_team->t.t_sched.sched = r_sched.sched;
 3406|      1|  hot_team->t.t_size_changed = 0;
 3407|      1|}
kmp_runtime.cpp:_ZL21__kmp_get_global_icvsv:
 3272|      2|static kmp_internal_control_t __kmp_get_global_icvs(void) {
 3273|       |
 3274|      2|  kmp_r_sched_t r_sched =
 3275|      2|      __kmp_get_schedule_global(); // get current state of scheduling globals
 3276|       |
 3277|      2|  KMP_DEBUG_ASSERT(__kmp_nested_proc_bind.used > 0);
 3278|       |
 3279|      2|  kmp_internal_control_t g_icvs = {
 3280|      2|    0, // int serial_nesting_level; //corresponds to value of th_team_serialized
 3281|      2|    (kmp_int8)__kmp_global.g.g_dynamic, // internal control for dynamic
 3282|       |    // adjustment of threads (per thread)
 3283|      2|    (kmp_int8)__kmp_env_blocktime, // int bt_set; //internal control for
 3284|       |    // whether blocktime is explicitly set
 3285|      2|    __kmp_dflt_blocktime, // int blocktime; //internal control for blocktime
 3286|       |#if KMP_USE_MONITOR
 3287|       |    __kmp_bt_intervals, // int bt_intervals; //internal control for blocktime
 3288|       |// intervals
 3289|       |#endif
 3290|      2|    __kmp_dflt_team_nth, // int nproc; //internal control for # of threads for
 3291|       |    // next parallel region (per thread)
 3292|       |    // (use a max ub on value if __kmp_parallel_initialize not called yet)
 3293|      2|    __kmp_cg_max_nth, // int thread_limit;
 3294|      2|    __kmp_dflt_max_active_levels, // int max_active_levels; //internal control
 3295|       |    // for max_active_levels
 3296|      2|    r_sched, // kmp_r_sched_t sched; //internal control for runtime schedule
 3297|       |    // {sched,chunk} pair
 3298|      2|    __kmp_nested_proc_bind.bind_types[0],
 3299|      2|    __kmp_default_device,
 3300|       |    NULL // struct kmp_internal_control *next;
 3301|      2|  };
 3302|       |
 3303|      2|  return g_icvs;
 3304|      2|}
kmp_runtime.cpp:_ZL16__kmp_reset_rootiP8kmp_root:
 4067|      1|static int __kmp_reset_root(int gtid, kmp_root_t *root) {
 4068|      1|  kmp_team_t *root_team = root->r.r_root_team;
 4069|      1|  kmp_team_t *hot_team = root->r.r_hot_team;
 4070|      1|  int n = hot_team->t.t_nproc;
 4071|      1|  int i;
 4072|       |
 4073|      1|  KMP_DEBUG_ASSERT(!root->r.r_active);
 4074|       |
 4075|      1|  root->r.r_root_team = NULL;
 4076|      1|  root->r.r_hot_team = NULL;
 4077|       |  // __kmp_free_team() does not free hot teams, so we have to clear r_hot_team
 4078|       |  // before call to __kmp_free_team().
 4079|      1|  __kmp_free_team(root, root_team USE_NESTED_HOT_ARG(NULL));
  ------------------
  |  |  165|      1|#define USE_NESTED_HOT_ARG(x) , x
  ------------------
 4080|      1|#if KMP_NESTED_HOT_TEAMS
 4081|      1|  if (__kmp_hot_teams_max_level >
  ------------------
  |  Branch (4081:7): [True: 1, False: 0]
  ------------------
 4082|      1|      0) { // need to free nested hot teams and their threads if any
 4083|      2|    for (i = 0; i < hot_team->t.t_nproc; ++i) {
  ------------------
  |  Branch (4083:17): [True: 1, False: 1]
  ------------------
 4084|      1|      kmp_info_t *th = hot_team->t.t_threads[i];
 4085|      1|      if (__kmp_hot_teams_max_level > 1) {
  ------------------
  |  Branch (4085:11): [True: 0, False: 1]
  ------------------
 4086|      0|        n += __kmp_free_hot_teams(root, th, 1, __kmp_hot_teams_max_level);
 4087|      0|      }
 4088|      1|      if (th->th.th_hot_teams) {
  ------------------
  |  Branch (4088:11): [True: 0, False: 1]
  ------------------
 4089|      0|        __kmp_free(th->th.th_hot_teams);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4090|      0|        th->th.th_hot_teams = NULL;
 4091|      0|      }
 4092|      1|    }
 4093|      1|  }
 4094|      1|#endif
 4095|      1|  __kmp_free_team(root, hot_team USE_NESTED_HOT_ARG(NULL));
  ------------------
  |  |  165|      1|#define USE_NESTED_HOT_ARG(x) , x
  ------------------
 4096|       |
 4097|       |  // Before we can reap the thread, we need to make certain that all other
 4098|       |  // threads in the teams that had this root as ancestor have stopped trying to
 4099|       |  // steal tasks.
 4100|      1|  if (__kmp_tasking_mode != tskm_immediate_exec) {
  ------------------
  |  Branch (4100:7): [True: 1, False: 0]
  ------------------
 4101|      1|    __kmp_wait_to_unref_task_teams();
 4102|      1|  }
 4103|       |
 4104|       |#if KMP_OS_WINDOWS
 4105|       |  /* Close Handle of root duplicated in __kmp_create_worker (tr #62919) */
 4106|       |  KA_TRACE(
 4107|       |      10, ("__kmp_reset_root: free handle, th = %p, handle = %" KMP_UINTPTR_SPEC
 4108|       |           "\n",
 4109|       |           (LPVOID) & (root->r.r_uber_thread->th),
 4110|       |           root->r.r_uber_thread->th.th_info.ds.ds_thread));
 4111|       |  __kmp_free_handle(root->r.r_uber_thread->th.th_info.ds.ds_thread);
 4112|       |#endif /* KMP_OS_WINDOWS */
 4113|       |
 4114|      1|#if OMPD_SUPPORT
 4115|      1|  if (ompd_state & OMPD_ENABLE_BP)
  ------------------
  |  |   35|      1|#define OMPD_ENABLE_BP 0x1
  ------------------
  |  Branch (4115:7): [True: 0, False: 1]
  ------------------
 4116|      0|    ompd_bp_thread_end();
 4117|      1|#endif
 4118|       |
 4119|      1|#if OMPT_SUPPORT
 4120|      1|  ompt_data_t *task_data;
 4121|      1|  ompt_data_t *parallel_data;
 4122|      1|  __ompt_get_task_info_internal(0, NULL, &task_data, NULL, &parallel_data,
 4123|      1|                                NULL);
 4124|      1|  if (ompt_enabled.ompt_callback_implicit_task) {
  ------------------
  |  Branch (4124:7): [True: 0, False: 1]
  ------------------
 4125|      0|    ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
 4126|      0|        ompt_scope_end, parallel_data, task_data, 0, 1, ompt_task_initial);
 4127|      0|  }
 4128|      1|  if (ompt_enabled.ompt_callback_thread_end) {
  ------------------
  |  Branch (4128:7): [True: 0, False: 1]
  ------------------
 4129|      0|    ompt_callbacks.ompt_callback(ompt_callback_thread_end)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
 4130|      0|        &(root->r.r_uber_thread->th.ompt_thread_info.thread_data));
 4131|      0|  }
 4132|      1|#endif
 4133|       |
 4134|      1|  TCW_4(__kmp_nth,
  ------------------
  |  | 1128|      1|#define TCW_4(a, b) (a) = (b)
  ------------------
 4135|      1|        __kmp_nth - 1); // __kmp_reap_thread will decrement __kmp_all_nth.
 4136|      1|  i = root->r.r_uber_thread->th.th_cg_roots->cg_nthreads--;
 4137|      1|  KA_TRACE(100, ("__kmp_reset_root: Thread %p decrement cg_nthreads on node %p"
 4138|      1|                 " to %d\n",
 4139|      1|                 root->r.r_uber_thread, root->r.r_uber_thread->th.th_cg_roots,
 4140|      1|                 root->r.r_uber_thread->th.th_cg_roots->cg_nthreads));
 4141|      1|  if (i == 1) {
  ------------------
  |  Branch (4141:7): [True: 1, False: 0]
  ------------------
 4142|       |    // need to free contention group structure
 4143|      1|    KMP_DEBUG_ASSERT(root->r.r_uber_thread ==
 4144|      1|                     root->r.r_uber_thread->th.th_cg_roots->cg_root);
 4145|      1|    KMP_DEBUG_ASSERT(root->r.r_uber_thread->th.th_cg_roots->up == NULL);
 4146|      1|    __kmp_free(root->r.r_uber_thread->th.th_cg_roots);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4147|      1|    root->r.r_uber_thread->th.th_cg_roots = NULL;
 4148|      1|  }
 4149|      1|  __kmp_reap_thread(root->r.r_uber_thread, 1);
 4150|       |
 4151|       |  // We canot put root thread to __kmp_thread_pool, so we have to reap it
 4152|       |  // instead of freeing.
 4153|      1|  root->r.r_uber_thread = NULL;
 4154|       |  /* mark root as no longer in use */
 4155|      1|  root->r.r_begin = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 4156|       |
 4157|      1|  return n;
 4158|      1|}
kmp_runtime.cpp:_ZL17__kmp_reap_threadP8kmp_infoi:
 6160|      1|static void __kmp_reap_thread(kmp_info_t *thread, int is_root) {
 6161|       |  // It is assumed __kmp_forkjoin_lock is acquired.
 6162|       |
 6163|      1|  int gtid;
 6164|       |
 6165|      1|  KMP_DEBUG_ASSERT(thread != NULL);
 6166|       |
 6167|      1|  gtid = thread->th.th_info.ds.ds_gtid;
 6168|       |
 6169|      1|  if (!is_root) {
  ------------------
  |  Branch (6169:7): [True: 0, False: 1]
  ------------------
 6170|      0|    if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME) {
  ------------------
  |  | 1184|      0|  (INT_MAX) /* Must be this for "infinite" setting the work */
  ------------------
  |  Branch (6170:9): [True: 0, False: 0]
  ------------------
 6171|       |      /* Assume the threads are at the fork barrier here */
 6172|      0|      KA_TRACE(
 6173|      0|          20, ("__kmp_reap_thread: releasing T#%d from fork barrier for reap\n",
 6174|      0|               gtid));
 6175|      0|      if (__kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
  ------------------
  |  Branch (6175:11): [True: 0, False: 0]
  ------------------
 6176|      0|        while (
 6177|      0|            !KMP_COMPARE_AND_STORE_ACQ32(&(thread->th.th_used_in_team), 0, 3))
  ------------------
  |  |  807|      0|  __sync_bool_compare_and_swap((volatile kmp_uint32 *)(p), (kmp_uint32)(cv),   \
  |  |  808|      0|                               (kmp_uint32)(sv))
  ------------------
  |  Branch (6177:13): [True: 0, False: 0]
  ------------------
 6178|      0|          KMP_CPU_PAUSE();
  ------------------
  |  | 1498|      0|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  ------------------
 6179|      0|        __kmp_resume_32(gtid, (kmp_flag_32<false, false> *)NULL);
 6180|      0|      } else {
 6181|       |        /* Need release fence here to prevent seg faults for tree forkjoin
 6182|       |           barrier (GEH) */
 6183|      0|        kmp_flag_64<> flag(&thread->th.th_bar[bs_forkjoin_barrier].bb.b_go,
 6184|      0|                           thread);
 6185|      0|        __kmp_release_64(&flag);
 6186|      0|      }
 6187|      0|    }
 6188|       |
 6189|       |    // Terminate OS thread.
 6190|      0|    __kmp_reap_worker(thread);
 6191|       |
 6192|       |    // The thread was killed asynchronously.  If it was actively
 6193|       |    // spinning in the thread pool, decrement the global count.
 6194|       |    //
 6195|       |    // There is a small timing hole here - if the worker thread was just waking
 6196|       |    // up after sleeping in the pool, had reset it's th_active_in_pool flag but
 6197|       |    // not decremented the global counter __kmp_thread_pool_active_nth yet, then
 6198|       |    // the global counter might not get updated.
 6199|       |    //
 6200|       |    // Currently, this can only happen as the library is unloaded,
 6201|       |    // so there are no harmful side effects.
 6202|      0|    if (thread->th.th_active_in_pool) {
  ------------------
  |  Branch (6202:9): [True: 0, False: 0]
  ------------------
 6203|      0|      thread->th.th_active_in_pool = FALSE;
  ------------------
  |  | 1279|      0|#define FALSE 0
  ------------------
 6204|      0|      KMP_ATOMIC_DEC(&__kmp_thread_pool_active_nth);
  ------------------
  |  | 1260|      0|#define KMP_ATOMIC_DEC(p) KMP_ATOMIC_OP(fetch_sub, p, 1, acq_rel)
  |  |  ------------------
  |  |  |  | 1246|      0|#define KMP_ATOMIC_OP(op, p, v, order) (p)->op(v, std::memory_order_##order)
  |  |  ------------------
  ------------------
 6205|      0|      KMP_DEBUG_ASSERT(__kmp_thread_pool_active_nth >= 0);
 6206|      0|    }
 6207|      0|  }
 6208|       |
 6209|      1|  __kmp_free_implicit_task(thread);
 6210|       |
 6211|       |// Free the fast memory for tasking
 6212|      1|#if USE_FAST_MEMORY
 6213|      1|  __kmp_free_fast_memory(thread);
 6214|      1|#endif /* USE_FAST_MEMORY */
 6215|       |
 6216|      1|  __kmp_suspend_uninitialize_thread(thread);
 6217|       |
 6218|      1|  KMP_DEBUG_ASSERT(__kmp_threads[gtid] == thread);
 6219|      1|  TCW_SYNC_PTR(__kmp_threads[gtid], NULL);
  ------------------
  |  | 1159|      1|#define TCW_SYNC_PTR(a, b) TCW_SYNC_8((a), (b))
  |  |  ------------------
  |  |  |  | 1141|      1|#define TCW_SYNC_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
 6220|       |
 6221|      1|  --__kmp_all_nth;
 6222|       |  // __kmp_nth was decremented when thread is added to the pool.
 6223|       |
 6224|      1|#ifdef KMP_ADJUST_BLOCKTIME
 6225|       |  /* Adjust blocktime back to user setting or default if necessary */
 6226|       |  /* Middle initialization might never have occurred                */
 6227|      1|  if (!__kmp_env_blocktime && (__kmp_avail_proc > 0)) {
  ------------------
  |  Branch (6227:7): [True: 1, False: 0]
  |  Branch (6227:31): [True: 0, False: 1]
  ------------------
 6228|      0|    KMP_DEBUG_ASSERT(__kmp_avail_proc > 0);
 6229|      0|    if (__kmp_nth <= __kmp_avail_proc) {
  ------------------
  |  Branch (6229:9): [True: 0, False: 0]
  ------------------
 6230|      0|      __kmp_zero_bt = FALSE;
  ------------------
  |  | 1279|      0|#define FALSE 0
  ------------------
 6231|      0|    }
 6232|      0|  }
 6233|      1|#endif /* KMP_ADJUST_BLOCKTIME */
 6234|       |
 6235|       |  /* free the memory being used */
 6236|      1|  if (__kmp_env_consistency_check) {
  ------------------
  |  Branch (6236:7): [True: 0, False: 1]
  ------------------
 6237|      0|    if (thread->th.th_cons) {
  ------------------
  |  Branch (6237:9): [True: 0, False: 0]
  ------------------
 6238|      0|      __kmp_free_cons_stack(thread->th.th_cons);
 6239|      0|      thread->th.th_cons = NULL;
 6240|      0|    }
 6241|      0|  }
 6242|       |
 6243|      1|  if (thread->th.th_pri_common != NULL) {
  ------------------
  |  Branch (6243:7): [True: 1, False: 0]
  ------------------
 6244|      1|    __kmp_free(thread->th.th_pri_common);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 6245|      1|    thread->th.th_pri_common = NULL;
 6246|      1|  }
 6247|       |
 6248|      1|  if (thread->th.th_task_state_memo_stack != NULL) {
  ------------------
  |  Branch (6248:7): [True: 1, False: 0]
  ------------------
 6249|      1|    __kmp_free(thread->th.th_task_state_memo_stack);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 6250|      1|    thread->th.th_task_state_memo_stack = NULL;
 6251|      1|  }
 6252|       |
 6253|      1|#if KMP_USE_BGET
 6254|      1|  if (thread->th.th_local.bget_data != NULL) {
  ------------------
  |  Branch (6254:7): [True: 1, False: 0]
  ------------------
 6255|      1|    __kmp_finalize_bget(thread);
 6256|      1|  }
 6257|      1|#endif
 6258|       |
 6259|      1|#if KMP_AFFINITY_SUPPORTED
 6260|      1|  if (thread->th.th_affin_mask != NULL) {
  ------------------
  |  Branch (6260:7): [True: 0, False: 1]
  ------------------
 6261|      0|    KMP_CPU_FREE(thread->th.th_affin_mask);
  ------------------
  |  |  698|      0|#define KMP_CPU_FREE(ptr) __kmp_affinity_dispatch->deallocate_mask(ptr)
  ------------------
 6262|      0|    thread->th.th_affin_mask = NULL;
 6263|      0|  }
 6264|      1|#endif /* KMP_AFFINITY_SUPPORTED */
 6265|       |
 6266|       |#if KMP_USE_HIER_SCHED
 6267|       |  if (thread->th.th_hier_bar_data != NULL) {
 6268|       |    __kmp_free(thread->th.th_hier_bar_data);
 6269|       |    thread->th.th_hier_bar_data = NULL;
 6270|       |  }
 6271|       |#endif
 6272|       |
 6273|      1|  __kmp_reap_team(thread->th.th_serial_team);
 6274|      1|  thread->th.th_serial_team = NULL;
 6275|      1|  __kmp_free(thread);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 6276|       |
 6277|      1|  KMP_MB();
 6278|       |
 6279|      1|} // __kmp_reap_thread
kmp_runtime.cpp:_ZL21__kmp_initialize_infoP8kmp_infoP8kmp_teamii:
 4247|      1|                                  int tid, int gtid) {
 4248|       |  /* this_thr->th.th_info.ds.ds_gtid is setup in
 4249|       |     kmp_allocate_thread/create_worker.
 4250|       |     this_thr->th.th_serial_team is setup in __kmp_allocate_thread */
 4251|      1|  KMP_DEBUG_ASSERT(this_thr != NULL);
 4252|      1|  KMP_DEBUG_ASSERT(this_thr->th.th_serial_team);
 4253|      1|  KMP_DEBUG_ASSERT(team);
 4254|      1|  KMP_DEBUG_ASSERT(team->t.t_threads);
 4255|      1|  KMP_DEBUG_ASSERT(team->t.t_dispatch);
 4256|      1|  kmp_info_t *master = team->t.t_threads[0];
 4257|      1|  KMP_DEBUG_ASSERT(master);
 4258|      1|  KMP_DEBUG_ASSERT(master->th.th_root);
 4259|       |
 4260|      1|  KMP_MB();
 4261|       |
 4262|      1|  TCW_SYNC_PTR(this_thr->th.th_team, team);
  ------------------
  |  | 1159|      1|#define TCW_SYNC_PTR(a, b) TCW_SYNC_8((a), (b))
  |  |  ------------------
  |  |  |  | 1141|      1|#define TCW_SYNC_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
 4263|       |
 4264|      1|  this_thr->th.th_info.ds.ds_tid = tid;
 4265|      1|  this_thr->th.th_set_nproc = 0;
 4266|      1|  if (__kmp_tasking_mode != tskm_immediate_exec)
  ------------------
  |  Branch (4266:7): [True: 1, False: 0]
  ------------------
 4267|       |    // When tasking is possible, threads are not safe to reap until they are
 4268|       |    // done tasking; this will be set when tasking code is exited in wait
 4269|      1|    this_thr->th.th_reap_state = KMP_NOT_SAFE_TO_REAP;
  ------------------
  |  | 2046|      1|  0 // Thread th_reap_state: not safe to reap (tasking)
  ------------------
 4270|      0|  else // no tasking --> always safe to reap
 4271|      0|    this_thr->th.th_reap_state = KMP_SAFE_TO_REAP;
  ------------------
  |  | 2047|      0|#define KMP_SAFE_TO_REAP 1 // Thread th_reap_state: safe to reap (not tasking)
  ------------------
 4272|      1|  this_thr->th.th_set_proc_bind = proc_bind_default;
 4273|      1|#if KMP_AFFINITY_SUPPORTED
 4274|      1|  this_thr->th.th_new_place = this_thr->th.th_current_place;
 4275|      1|#endif
 4276|      1|  this_thr->th.th_root = master->th.th_root;
 4277|       |
 4278|       |  /* setup the thread's cache of the team structure */
 4279|      1|  this_thr->th.th_team_nproc = team->t.t_nproc;
 4280|      1|  this_thr->th.th_team_master = master;
 4281|      1|  this_thr->th.th_team_serialized = team->t.t_serialized;
 4282|       |
 4283|      1|  KMP_DEBUG_ASSERT(team->t.t_implicit_task_taskdata);
 4284|       |
 4285|      1|  KF_TRACE(10, ("__kmp_initialize_info1: T#%d:%d this_thread=%p curtask=%p\n",
 4286|      1|                tid, gtid, this_thr, this_thr->th.th_current_task));
 4287|       |
 4288|      1|  __kmp_init_implicit_task(this_thr->th.th_team_master->th.th_ident, this_thr,
 4289|      1|                           team, tid, TRUE);
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 4290|       |
 4291|      1|  KF_TRACE(10, ("__kmp_initialize_info2: T#%d:%d this_thread=%p curtask=%p\n",
 4292|      1|                tid, gtid, this_thr, this_thr->th.th_current_task));
 4293|       |  // TODO: Initialize ICVs from parent; GEH - isn't that already done in
 4294|       |  // __kmp_initialize_team()?
 4295|       |
 4296|       |  /* TODO no worksharing in speculative threads */
 4297|      1|  this_thr->th.th_dispatch = &team->t.t_dispatch[tid];
 4298|       |
 4299|      1|  this_thr->th.th_local.this_construct = 0;
 4300|       |
 4301|      1|  if (!this_thr->th.th_pri_common) {
  ------------------
  |  Branch (4301:7): [True: 1, False: 0]
  ------------------
 4302|      1|    this_thr->th.th_pri_common =
 4303|      1|        (struct common_table *)__kmp_allocate(sizeof(struct common_table));
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 4304|      1|    if (__kmp_storage_map) {
  ------------------
  |  Branch (4304:9): [True: 0, False: 1]
  ------------------
 4305|      0|      __kmp_print_storage_map_gtid(
 4306|      0|          gtid, this_thr->th.th_pri_common, this_thr->th.th_pri_common + 1,
 4307|      0|          sizeof(struct common_table), "th_%d.th_pri_common\n", gtid);
 4308|      0|    }
 4309|      1|    this_thr->th.th_pri_head = NULL;
 4310|      1|  }
 4311|       |
 4312|      1|  if (this_thr != master && // Primary thread's CG root is initialized elsewhere
  ------------------
  |  Branch (4312:7): [True: 0, False: 1]
  ------------------
 4313|      0|      this_thr->th.th_cg_roots != master->th.th_cg_roots) { // CG root not set
  ------------------
  |  Branch (4313:7): [True: 0, False: 0]
  ------------------
 4314|       |    // Make new thread's CG root same as primary thread's
 4315|      0|    KMP_DEBUG_ASSERT(master->th.th_cg_roots);
 4316|      0|    kmp_cg_root_t *tmp = this_thr->th.th_cg_roots;
 4317|      0|    if (tmp) {
  ------------------
  |  Branch (4317:9): [True: 0, False: 0]
  ------------------
 4318|       |      // worker changes CG, need to check if old CG should be freed
 4319|      0|      int i = tmp->cg_nthreads--;
 4320|      0|      KA_TRACE(100, ("__kmp_initialize_info: Thread %p decrement cg_nthreads"
 4321|      0|                     " on node %p of thread %p to %d\n",
 4322|      0|                     this_thr, tmp, tmp->cg_root, tmp->cg_nthreads));
 4323|      0|      if (i == 1) {
  ------------------
  |  Branch (4323:11): [True: 0, False: 0]
  ------------------
 4324|      0|        __kmp_free(tmp); // last thread left CG --> free it
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4325|      0|      }
 4326|      0|    }
 4327|      0|    this_thr->th.th_cg_roots = master->th.th_cg_roots;
 4328|       |    // Increment new thread's CG root's counter to add the new thread
 4329|      0|    this_thr->th.th_cg_roots->cg_nthreads++;
 4330|      0|    KA_TRACE(100, ("__kmp_initialize_info: Thread %p increment cg_nthreads on"
 4331|      0|                   " node %p of thread %p to %d\n",
 4332|      0|                   this_thr, this_thr->th.th_cg_roots,
 4333|      0|                   this_thr->th.th_cg_roots->cg_root,
 4334|      0|                   this_thr->th.th_cg_roots->cg_nthreads));
 4335|      0|    this_thr->th.th_current_task->td_icvs.thread_limit =
 4336|      0|        this_thr->th.th_cg_roots->cg_thread_limit;
 4337|      0|  }
 4338|       |
 4339|       |  /* Initialize dynamic dispatch */
 4340|      1|  {
 4341|      1|    volatile kmp_disp_t *dispatch = this_thr->th.th_dispatch;
 4342|       |    // Use team max_nproc since this will never change for the team.
 4343|      1|    size_t disp_size =
 4344|      1|        sizeof(dispatch_private_info_t) *
 4345|      1|        (team->t.t_max_nproc == 1 ? 1 : __kmp_dispatch_num_buffers);
  ------------------
  |  Branch (4345:10): [True: 1, False: 0]
  ------------------
 4346|      1|    KD_TRACE(10, ("__kmp_initialize_info: T#%d max_nproc: %d\n", gtid,
 4347|      1|                  team->t.t_max_nproc));
 4348|      1|    KMP_ASSERT(dispatch);
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 4349|      1|    KMP_DEBUG_ASSERT(team->t.t_dispatch);
 4350|      1|    KMP_DEBUG_ASSERT(dispatch == &team->t.t_dispatch[tid]);
 4351|       |
 4352|      1|    dispatch->th_disp_index = 0;
 4353|      1|    dispatch->th_doacross_buf_idx = 0;
 4354|      1|    if (!dispatch->th_disp_buffer) {
  ------------------
  |  Branch (4354:9): [True: 1, False: 0]
  ------------------
 4355|      1|      dispatch->th_disp_buffer =
 4356|      1|          (dispatch_private_info_t *)__kmp_allocate(disp_size);
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 4357|       |
 4358|      1|      if (__kmp_storage_map) {
  ------------------
  |  Branch (4358:11): [True: 0, False: 1]
  ------------------
 4359|      0|        __kmp_print_storage_map_gtid(
 4360|      0|            gtid, &dispatch->th_disp_buffer[0],
 4361|      0|            &dispatch->th_disp_buffer[team->t.t_max_nproc == 1
  ------------------
  |  Branch (4361:39): [True: 0, False: 0]
  ------------------
 4362|      0|                                          ? 1
 4363|      0|                                          : __kmp_dispatch_num_buffers],
 4364|      0|            disp_size,
 4365|      0|            "th_%d.th_dispatch.th_disp_buffer "
 4366|      0|            "(team_%d.t_dispatch[%d].th_disp_buffer)",
 4367|      0|            gtid, team->t.t_id, gtid);
 4368|      0|      }
 4369|      1|    } else {
 4370|      0|      memset(&dispatch->th_disp_buffer[0], '\0', disp_size);
 4371|      0|    }
 4372|       |
 4373|      1|    dispatch->th_dispatch_pr_current = 0;
 4374|      1|    dispatch->th_dispatch_sh_current = 0;
 4375|       |
 4376|      1|    dispatch->th_deo_fcn = 0; /* ORDERED     */
 4377|      1|    dispatch->th_dxo_fcn = 0; /* END ORDERED */
 4378|      1|  }
 4379|       |
 4380|      1|  this_thr->th.th_next_pool = NULL;
 4381|       |
 4382|      1|  if (!this_thr->th.th_task_state_memo_stack) {
  ------------------
  |  Branch (4382:7): [True: 1, False: 0]
  ------------------
 4383|      1|    size_t i;
 4384|      1|    this_thr->th.th_task_state_memo_stack =
 4385|      1|        (kmp_uint8 *)__kmp_allocate(4 * sizeof(kmp_uint8));
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 4386|      1|    this_thr->th.th_task_state_top = 0;
 4387|      1|    this_thr->th.th_task_state_stack_sz = 4;
 4388|      5|    for (i = 0; i < this_thr->th.th_task_state_stack_sz;
  ------------------
  |  Branch (4388:17): [True: 4, False: 1]
  ------------------
 4389|      4|         ++i) // zero init the stack
 4390|      4|      this_thr->th.th_task_state_memo_stack[i] = 0;
 4391|      1|  }
 4392|       |
 4393|      1|  KMP_DEBUG_ASSERT(!this_thr->th.th_spin_here);
 4394|      1|  KMP_DEBUG_ASSERT(this_thr->th.th_next_waiting == 0);
 4395|       |
 4396|      1|  KMP_MB();
 4397|      1|}
kmp_runtime.cpp:_ZL23__kmp_reinitialize_teamP8kmp_teamP20kmp_internal_controlP5ident:
 4694|      3|                                    ident_t *loc) {
 4695|      3|  KF_TRACE(10, ("__kmp_reinitialize_team: enter this_thread=%p team=%p\n",
 4696|      3|                team->t.t_threads[0], team));
 4697|      3|  KMP_DEBUG_ASSERT(team && new_icvs);
 4698|      3|  KMP_DEBUG_ASSERT((!TCR_4(__kmp_init_parallel)) || new_icvs->nproc);
 4699|      3|  KMP_CHECK_UPDATE(team->t.t_ident, loc);
  ------------------
  |  | 2280|      3|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 0, False: 3]
  |  |  ------------------
  |  | 2281|      3|  (a) = (b)
  ------------------
 4700|       |
 4701|      3|  KMP_CHECK_UPDATE(team->t.t_id, KMP_GEN_TEAM_ID());
  ------------------
  |  | 2280|      3|  if ((a) != (b))                                                              \
  |  |  ------------------
  |  |  |  Branch (2280:7): [True: 3, False: 0]
  |  |  ------------------
  |  | 2281|      3|  (a) = (b)
  ------------------
 4702|       |  // Copy ICVs to the primary thread's implicit taskdata
 4703|      3|  __kmp_init_implicit_task(loc, team->t.t_threads[0], team, 0, FALSE);
  ------------------
  |  | 1279|      3|#define FALSE 0
  ------------------
 4704|      3|  copy_icvs(&team->t.t_implicit_task_taskdata[0].td_icvs, new_icvs);
 4705|       |
 4706|      3|  KF_TRACE(10, ("__kmp_reinitialize_team: exit this_thread=%p team=%p\n",
 4707|      3|                team->t.t_threads[0], team));
 4708|      3|}
kmp_runtime.cpp:_ZL21__kmp_initialize_teamP8kmp_teamiP20kmp_internal_controlP5ident:
 4715|      3|                                  ident_t *loc) {
 4716|      3|  KF_TRACE(10, ("__kmp_initialize_team: enter: team=%p\n", team));
 4717|       |
 4718|       |  /* verify */
 4719|      3|  KMP_DEBUG_ASSERT(team);
 4720|      3|  KMP_DEBUG_ASSERT(new_nproc <= team->t.t_max_nproc);
 4721|      3|  KMP_DEBUG_ASSERT(team->t.t_threads);
 4722|      3|  KMP_MB();
 4723|       |
 4724|      3|  team->t.t_master_tid = 0; /* not needed */
 4725|       |  /* team->t.t_master_bar;        not needed */
 4726|      3|  team->t.t_serialized = new_nproc > 1 ? 0 : 1;
  ------------------
  |  Branch (4726:26): [True: 0, False: 3]
  ------------------
 4727|      3|  team->t.t_nproc = new_nproc;
 4728|       |
 4729|       |  /* team->t.t_parent     = NULL; TODO not needed & would mess up hot team */
 4730|      3|  team->t.t_next_pool = NULL;
 4731|       |  /* memset( team->t.t_threads, 0, sizeof(kmp_info_t*)*new_nproc ); would mess
 4732|       |   * up hot team */
 4733|       |
 4734|      3|  TCW_SYNC_PTR(team->t.t_pkfn, NULL); /* not needed */
  ------------------
  |  | 1159|      3|#define TCW_SYNC_PTR(a, b) TCW_SYNC_8((a), (b))
  |  |  ------------------
  |  |  |  | 1141|      3|#define TCW_SYNC_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
 4735|      3|  team->t.t_invoke = NULL; /* not needed */
 4736|       |
 4737|       |  // TODO???: team->t.t_max_active_levels       = new_max_active_levels;
 4738|      3|  team->t.t_sched.sched = new_icvs->sched.sched;
 4739|       |
 4740|      3|#if KMP_ARCH_X86 || KMP_ARCH_X86_64
 4741|      3|  team->t.t_fp_control_saved = FALSE; /* not needed */
  ------------------
  |  | 1279|      3|#define FALSE 0
  ------------------
 4742|      3|  team->t.t_x87_fpu_control_word = 0; /* not needed */
 4743|      3|  team->t.t_mxcsr = 0; /* not needed */
 4744|      3|#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
 4745|       |
 4746|      3|  team->t.t_construct = 0;
 4747|       |
 4748|      3|  team->t.t_ordered.dt.t_value = 0;
 4749|      3|  team->t.t_master_active = FALSE;
  ------------------
  |  | 1279|      3|#define FALSE 0
  ------------------
 4750|       |
 4751|       |#ifdef KMP_DEBUG
 4752|       |  team->t.t_copypriv_data = NULL; /* not necessary, but nice for debugging */
 4753|       |#endif
 4754|       |#if KMP_OS_WINDOWS
 4755|       |  team->t.t_copyin_counter = 0; /* for barrier-free copyin implementation */
 4756|       |#endif
 4757|       |
 4758|      3|  team->t.t_control_stack_top = NULL;
 4759|       |
 4760|      3|  __kmp_reinitialize_team(team, new_icvs, loc);
 4761|       |
 4762|      3|  KMP_MB();
 4763|      3|  KF_TRACE(10, ("__kmp_initialize_team: exit: team=%p\n", team));
 4764|      3|}
kmp_runtime.cpp:_ZL24__kmp_alloc_argv_entriesiP8kmp_teami:
 3170|      3|static void __kmp_alloc_argv_entries(int argc, kmp_team_t *team, int realloc) {
 3171|       |
 3172|      3|  KMP_DEBUG_ASSERT(team);
 3173|      3|  if (!realloc || argc > team->t.t_max_argc) {
  ------------------
  |  Branch (3173:7): [True: 3, False: 0]
  |  Branch (3173:19): [True: 0, False: 0]
  ------------------
 3174|       |
 3175|      3|    KA_TRACE(100, ("__kmp_alloc_argv_entries: team %d: needed entries=%d, "
 3176|      3|                   "current entries=%d\n",
 3177|      3|                   team->t.t_id, argc, (realloc) ? team->t.t_max_argc : 0));
 3178|       |    /* if previously allocated heap space for args, free them */
 3179|      3|    if (realloc && team->t.t_argv != &team->t.t_inline_argv[0])
  ------------------
  |  Branch (3179:9): [True: 0, False: 3]
  |  Branch (3179:20): [True: 0, False: 0]
  ------------------
 3180|      0|      __kmp_free((void *)team->t.t_argv);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3181|       |
 3182|      3|    if (argc <= KMP_INLINE_ARGV_ENTRIES) {
  ------------------
  |  | 2998|      3|#define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  | 2990|      3|  (4 * CACHE_LINE -                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      3|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  |  | 2991|      3|   ((3 * KMP_PTR_SKIP + 2 * sizeof(int) + 2 * sizeof(kmp_int8) +               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      3|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  |  |  ------------------
  |  |  |  | 2992|      3|     sizeof(kmp_int16) + sizeof(kmp_uint32)) %                                 \
  |  |  |  | 2993|      3|    CACHE_LINE))
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      3|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  |   30|      3|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  ------------------
  ------------------
  |  Branch (3182:9): [True: 3, False: 0]
  ------------------
 3183|       |      /* use unused space in the cache line for arguments */
 3184|      3|      team->t.t_max_argc = KMP_INLINE_ARGV_ENTRIES;
  ------------------
  |  | 2998|      3|#define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  | 2990|      3|  (4 * CACHE_LINE -                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      3|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  |  | 2991|      3|   ((3 * KMP_PTR_SKIP + 2 * sizeof(int) + 2 * sizeof(kmp_int8) +               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      3|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  |  |  ------------------
  |  |  |  | 2992|      3|     sizeof(kmp_int16) + sizeof(kmp_uint32)) %                                 \
  |  |  |  | 2993|      3|    CACHE_LINE))
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      3|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  |   30|      3|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  ------------------
  ------------------
 3185|      3|      KA_TRACE(100, ("__kmp_alloc_argv_entries: team %d: inline allocate %d "
 3186|      3|                     "argv entries\n",
 3187|      3|                     team->t.t_id, team->t.t_max_argc));
 3188|      3|      team->t.t_argv = &team->t.t_inline_argv[0];
 3189|      3|      if (__kmp_storage_map) {
  ------------------
  |  Branch (3189:11): [True: 0, False: 3]
  ------------------
 3190|      0|        __kmp_print_storage_map_gtid(
 3191|      0|            -1, &team->t.t_inline_argv[0],
 3192|      0|            &team->t.t_inline_argv[KMP_INLINE_ARGV_ENTRIES],
  ------------------
  |  | 2998|      0|#define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  | 2990|      0|  (4 * CACHE_LINE -                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      0|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  |  | 2991|      0|   ((3 * KMP_PTR_SKIP + 2 * sizeof(int) + 2 * sizeof(kmp_int8) +               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  |  |  ------------------
  |  |  |  | 2992|      0|     sizeof(kmp_int16) + sizeof(kmp_uint32)) %                                 \
  |  |  |  | 2993|      0|    CACHE_LINE))
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      0|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  |   30|      0|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  ------------------
  ------------------
 3193|      0|            (sizeof(void *) * KMP_INLINE_ARGV_ENTRIES), "team_%d.t_inline_argv",
  ------------------
  |  | 2998|      0|#define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  | 2990|      0|  (4 * CACHE_LINE -                                                            \
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      0|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  |  | 2991|      0|   ((3 * KMP_PTR_SKIP + 2 * sizeof(int) + 2 * sizeof(kmp_int8) +               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  |  |  ------------------
  |  |  |  | 2992|      0|     sizeof(kmp_int16) + sizeof(kmp_uint32)) %                                 \
  |  |  |  | 2993|      0|    CACHE_LINE))
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|      0|# define CACHE_LINE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define KMP_INLINE_ARGV_ENTRIES (int)(KMP_INLINE_ARGV_BYTES / KMP_PTR_SKIP)
  |  |  ------------------
  |  |  |  |   30|      0|#define KMP_PTR_SKIP (sizeof(void *))
  |  |  ------------------
  ------------------
 3194|      0|            team->t.t_id);
 3195|      0|      }
 3196|      3|    } else {
 3197|       |      /* allocate space for arguments in the heap */
 3198|      0|      team->t.t_max_argc = (argc <= (KMP_MIN_MALLOC_ARGV_ENTRIES >> 1))
  ------------------
  |  | 2982|      0|#define KMP_MIN_MALLOC_ARGV_ENTRIES 100
  ------------------
  |  Branch (3198:28): [True: 0, False: 0]
  ------------------
 3199|      0|                               ? KMP_MIN_MALLOC_ARGV_ENTRIES
  ------------------
  |  | 2982|      0|#define KMP_MIN_MALLOC_ARGV_ENTRIES 100
  ------------------
 3200|      0|                               : 2 * argc;
 3201|      0|      KA_TRACE(100, ("__kmp_alloc_argv_entries: team %d: dynamic allocate %d "
 3202|      0|                     "argv entries\n",
 3203|      0|                     team->t.t_id, team->t.t_max_argc));
 3204|      0|      team->t.t_argv =
 3205|      0|          (void **)__kmp_page_allocate(sizeof(void *) * team->t.t_max_argc);
  ------------------
  |  | 3618|      0|#define __kmp_page_allocate(size) ___kmp_page_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3206|      0|      if (__kmp_storage_map) {
  ------------------
  |  Branch (3206:11): [True: 0, False: 0]
  ------------------
 3207|      0|        __kmp_print_storage_map_gtid(-1, &team->t.t_argv[0],
 3208|      0|                                     &team->t.t_argv[team->t.t_max_argc],
 3209|      0|                                     sizeof(void *) * team->t.t_max_argc,
 3210|      0|                                     "team_%d.t_argv", team->t.t_id);
 3211|      0|      }
 3212|      0|    }
 3213|      3|  }
 3214|      3|}
kmp_runtime.cpp:_ZL26__kmp_allocate_team_arraysP8kmp_teami:
 3216|      3|static void __kmp_allocate_team_arrays(kmp_team_t *team, int max_nth) {
 3217|      3|  int i;
 3218|      3|  int num_disp_buff = max_nth > 1 ? __kmp_dispatch_num_buffers : 2;
  ------------------
  |  Branch (3218:23): [True: 1, False: 2]
  ------------------
 3219|      3|  team->t.t_threads =
 3220|      3|      (kmp_info_t **)__kmp_allocate(sizeof(kmp_info_t *) * max_nth);
  ------------------
  |  | 3617|      3|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3221|      3|  team->t.t_disp_buffer = (dispatch_shared_info_t *)__kmp_allocate(
  ------------------
  |  | 3617|      3|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3222|      3|      sizeof(dispatch_shared_info_t) * num_disp_buff);
 3223|      3|  team->t.t_dispatch =
 3224|      3|      (kmp_disp_t *)__kmp_allocate(sizeof(kmp_disp_t) * max_nth);
  ------------------
  |  | 3617|      3|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3225|      3|  team->t.t_implicit_task_taskdata =
 3226|      3|      (kmp_taskdata_t *)__kmp_allocate(sizeof(kmp_taskdata_t) * max_nth);
  ------------------
  |  | 3617|      3|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 3227|      3|  team->t.t_max_nproc = max_nth;
 3228|       |
 3229|       |  /* setup dispatch buffers */
 3230|     14|  for (i = 0; i < num_disp_buff; ++i) {
  ------------------
  |  Branch (3230:15): [True: 11, False: 3]
  ------------------
 3231|     11|    team->t.t_disp_buffer[i].buffer_index = i;
 3232|     11|    team->t.t_disp_buffer[i].doacross_buf_idx = i;
 3233|     11|  }
 3234|      3|}
kmp_runtime.cpp:_ZL22__kmp_free_team_arraysP8kmp_team:
 3236|      3|static void __kmp_free_team_arrays(kmp_team_t *team) {
 3237|       |  /* Note: this does not free the threads in t_threads (__kmp_free_threads) */
 3238|      3|  int i;
 3239|     69|  for (i = 0; i < team->t.t_max_nproc; ++i) {
  ------------------
  |  Branch (3239:15): [True: 66, False: 3]
  ------------------
 3240|     66|    if (team->t.t_dispatch[i].th_disp_buffer != NULL) {
  ------------------
  |  Branch (3240:9): [True: 1, False: 65]
  ------------------
 3241|      1|      __kmp_free(team->t.t_dispatch[i].th_disp_buffer);
  ------------------
  |  | 3619|      1|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3242|      1|      team->t.t_dispatch[i].th_disp_buffer = NULL;
 3243|      1|    }
 3244|     66|  }
 3245|       |#if KMP_USE_HIER_SCHED
 3246|       |  __kmp_dispatch_free_hierarchies(team);
 3247|       |#endif
 3248|      3|  __kmp_free(team->t.t_threads);
  ------------------
  |  | 3619|      3|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3249|      3|  __kmp_free(team->t.t_disp_buffer);
  ------------------
  |  | 3619|      3|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3250|      3|  __kmp_free(team->t.t_dispatch);
  ------------------
  |  | 3619|      3|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3251|      3|  __kmp_free(team->t.t_implicit_task_taskdata);
  ------------------
  |  | 3619|      3|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 3252|      3|  team->t.t_threads = NULL;
 3253|      3|  team->t.t_disp_buffer = NULL;
 3254|       |  team->t.t_dispatch = NULL;
 3255|      3|  team->t.t_implicit_task_taskdata = 0;
 3256|      3|}
kmp_runtime.cpp:_ZL19__kmp_itthash_cleanP8kmp_info:
 6281|      1|static void __kmp_itthash_clean(kmp_info_t *th) {
 6282|       |#if USE_ITT_NOTIFY
 6283|       |  if (__kmp_itt_region_domains.count > 0) {
 6284|       |    for (int i = 0; i < KMP_MAX_FRAME_DOMAINS; ++i) {
 6285|       |      kmp_itthash_entry_t *bucket = __kmp_itt_region_domains.buckets[i];
 6286|       |      while (bucket) {
 6287|       |        kmp_itthash_entry_t *next = bucket->next_in_bucket;
 6288|       |        __kmp_thread_free(th, bucket);
 6289|       |        bucket = next;
 6290|       |      }
 6291|       |    }
 6292|       |  }
 6293|       |  if (__kmp_itt_barrier_domains.count > 0) {
 6294|       |    for (int i = 0; i < KMP_MAX_FRAME_DOMAINS; ++i) {
 6295|       |      kmp_itthash_entry_t *bucket = __kmp_itt_barrier_domains.buckets[i];
 6296|       |      while (bucket) {
 6297|       |        kmp_itthash_entry_t *next = bucket->next_in_bucket;
 6298|       |        __kmp_thread_free(th, bucket);
 6299|       |        bucket = next;
 6300|       |      }
 6301|       |    }
 6302|       |  }
 6303|       |#endif
 6304|      1|}
kmp_runtime.cpp:_ZL18__kmp_internal_endv:
 6306|      1|static void __kmp_internal_end(void) {
 6307|      1|  int i;
 6308|       |
 6309|       |  /* First, unregister the library */
 6310|      1|  __kmp_unregister_library();
 6311|       |
 6312|       |#if KMP_OS_WINDOWS
 6313|       |  /* In Win static library, we can't tell when a root actually dies, so we
 6314|       |     reclaim the data structures for any root threads that have died but not
 6315|       |     unregistered themselves, in order to shut down cleanly.
 6316|       |     In Win dynamic library we also can't tell when a thread dies.  */
 6317|       |  __kmp_reclaim_dead_roots(); // AC: moved here to always clean resources of
 6318|       |// dead roots
 6319|       |#endif
 6320|       |
 6321|    137|  for (i = 0; i < __kmp_threads_capacity; i++)
  ------------------
  |  Branch (6321:15): [True: 136, False: 1]
  ------------------
 6322|    136|    if (__kmp_root[i])
  ------------------
  |  Branch (6322:9): [True: 1, False: 135]
  ------------------
 6323|      1|      if (__kmp_root[i]->r.r_active)
  ------------------
  |  Branch (6323:11): [True: 0, False: 1]
  ------------------
 6324|      0|        break;
 6325|      1|  KMP_MB(); /* Flush all pending memory write invalidates.  */
 6326|      1|  TCW_SYNC_4(__kmp_global.g.g_done, TRUE);
  ------------------
  |  | 1136|      1|#define TCW_SYNC_4(a, b) (a) = (b)
  ------------------
 6327|       |
 6328|      1|  if (i < __kmp_threads_capacity) {
  ------------------
  |  Branch (6328:7): [True: 0, False: 1]
  ------------------
 6329|       |#if KMP_USE_MONITOR
 6330|       |    // 2009-09-08 (lev): Other alive roots found. Why do we kill the monitor??
 6331|       |    KMP_MB(); /* Flush all pending memory write invalidates.  */
 6332|       |
 6333|       |    // Need to check that monitor was initialized before reaping it. If we are
 6334|       |    // called form __kmp_atfork_child (which sets __kmp_init_parallel = 0), then
 6335|       |    // __kmp_monitor will appear to contain valid data, but it is only valid in
 6336|       |    // the parent process, not the child.
 6337|       |    // New behavior (201008): instead of keying off of the flag
 6338|       |    // __kmp_init_parallel, the monitor thread creation is keyed off
 6339|       |    // of the new flag __kmp_init_monitor.
 6340|       |    __kmp_acquire_bootstrap_lock(&__kmp_monitor_lock);
 6341|       |    if (TCR_4(__kmp_init_monitor)) {
 6342|       |      __kmp_reap_monitor(&__kmp_monitor);
 6343|       |      TCW_4(__kmp_init_monitor, 0);
 6344|       |    }
 6345|       |    __kmp_release_bootstrap_lock(&__kmp_monitor_lock);
 6346|       |    KA_TRACE(10, ("__kmp_internal_end: monitor reaped\n"));
 6347|       |#endif // KMP_USE_MONITOR
 6348|      1|  } else {
 6349|       |/* TODO move this to cleanup code */
 6350|       |#ifdef KMP_DEBUG
 6351|       |    /* make sure that everything has properly ended */
 6352|       |    for (i = 0; i < __kmp_threads_capacity; i++) {
 6353|       |      if (__kmp_root[i]) {
 6354|       |        //                    KMP_ASSERT( ! KMP_UBER_GTID( i ) );         // AC:
 6355|       |        //                    there can be uber threads alive here
 6356|       |        KMP_ASSERT(!__kmp_root[i]->r.r_active); // TODO: can they be active?
 6357|       |      }
 6358|       |    }
 6359|       |#endif
 6360|       |
 6361|      1|    KMP_MB();
 6362|       |
 6363|       |    // Reap the worker threads.
 6364|       |    // This is valid for now, but be careful if threads are reaped sooner.
 6365|      1|    while (__kmp_thread_pool != NULL) { // Loop thru all the thread in the pool.
  ------------------
  |  Branch (6365:12): [True: 0, False: 1]
  ------------------
 6366|       |      // Get the next thread from the pool.
 6367|      0|      kmp_info_t *thread = CCAST(kmp_info_t *, __kmp_thread_pool);
  ------------------
  |  |  229|      0|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 6368|      0|      __kmp_thread_pool = thread->th.th_next_pool;
 6369|       |      // Reap it.
 6370|      0|      KMP_DEBUG_ASSERT(thread->th.th_reap_state == KMP_SAFE_TO_REAP);
 6371|      0|      thread->th.th_next_pool = NULL;
 6372|      0|      thread->th.th_in_pool = FALSE;
  ------------------
  |  | 1279|      0|#define FALSE 0
  ------------------
 6373|      0|      __kmp_reap_thread(thread, 0);
 6374|      0|    }
 6375|      1|    __kmp_thread_pool_insert_pt = NULL;
 6376|       |
 6377|       |    // Reap teams.
 6378|      3|    while (__kmp_team_pool != NULL) { // Loop thru all the teams in the pool.
  ------------------
  |  Branch (6378:12): [True: 2, False: 1]
  ------------------
 6379|       |      // Get the next team from the pool.
 6380|      2|      kmp_team_t *team = CCAST(kmp_team_t *, __kmp_team_pool);
  ------------------
  |  |  229|      2|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 6381|      2|      __kmp_team_pool = team->t.t_next_pool;
 6382|       |      // Reap it.
 6383|      2|      team->t.t_next_pool = NULL;
 6384|      2|      __kmp_reap_team(team);
 6385|      2|    }
 6386|       |
 6387|      1|    __kmp_reap_task_teams();
 6388|       |
 6389|      1|#if KMP_OS_UNIX
 6390|       |    // Threads that are not reaped should not access any resources since they
 6391|       |    // are going to be deallocated soon, so the shutdown sequence should wait
 6392|       |    // until all threads either exit the final spin-waiting loop or begin
 6393|       |    // sleeping after the given blocktime.
 6394|    137|    for (i = 0; i < __kmp_threads_capacity; i++) {
  ------------------
  |  Branch (6394:17): [True: 136, False: 1]
  ------------------
 6395|    136|      kmp_info_t *thr = __kmp_threads[i];
 6396|    136|      while (thr && KMP_ATOMIC_LD_ACQ(&thr->th.th_blocking))
  ------------------
  |  | 1249|      0|#define KMP_ATOMIC_LD_ACQ(p) KMP_ATOMIC_LD(p, acquire)
  |  |  ------------------
  |  |  |  | 1245|      0|#define KMP_ATOMIC_LD(p, order) (p)->load(std::memory_order_##order)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1245:33): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6396:14): [True: 0, False: 136]
  ------------------
 6397|      0|        KMP_CPU_PAUSE();
  ------------------
  |  | 1498|      0|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  ------------------
 6398|    136|    }
 6399|      1|#endif
 6400|       |
 6401|    137|    for (i = 0; i < __kmp_threads_capacity; ++i) {
  ------------------
  |  Branch (6401:17): [True: 136, False: 1]
  ------------------
 6402|       |      // TBD: Add some checking...
 6403|       |      // Something like KMP_DEBUG_ASSERT( __kmp_thread[ i ] == NULL );
 6404|    136|    }
 6405|       |
 6406|       |    /* Make sure all threadprivate destructors get run by joining with all
 6407|       |       worker threads before resetting this flag */
 6408|      1|    TCW_SYNC_4(__kmp_init_common, FALSE);
  ------------------
  |  | 1136|      1|#define TCW_SYNC_4(a, b) (a) = (b)
  ------------------
 6409|       |
 6410|      1|    KA_TRACE(10, ("__kmp_internal_end: all workers reaped\n"));
 6411|      1|    KMP_MB();
 6412|       |
 6413|       |#if KMP_USE_MONITOR
 6414|       |    // See note above: One of the possible fixes for CQ138434 / CQ140126
 6415|       |    //
 6416|       |    // FIXME: push both code fragments down and CSE them?
 6417|       |    // push them into __kmp_cleanup() ?
 6418|       |    __kmp_acquire_bootstrap_lock(&__kmp_monitor_lock);
 6419|       |    if (TCR_4(__kmp_init_monitor)) {
 6420|       |      __kmp_reap_monitor(&__kmp_monitor);
 6421|       |      TCW_4(__kmp_init_monitor, 0);
 6422|       |    }
 6423|       |    __kmp_release_bootstrap_lock(&__kmp_monitor_lock);
 6424|       |    KA_TRACE(10, ("__kmp_internal_end: monitor reaped\n"));
 6425|       |#endif
 6426|      1|  } /* else !__kmp_global.t_active */
 6427|      1|  TCW_4(__kmp_init_gtid, FALSE);
  ------------------
  |  | 1128|      1|#define TCW_4(a, b) (a) = (b)
  ------------------
 6428|      1|  KMP_MB(); /* Flush all pending memory write invalidates.  */
 6429|       |
 6430|      1|  __kmp_cleanup();
 6431|      1|#if OMPT_SUPPORT
 6432|      1|  ompt_fini();
 6433|      1|#endif
 6434|      1|}
kmp_runtime.cpp:_ZL20__kmp_fini_allocatorv:
  554|      1|static void __kmp_fini_allocator() { __kmp_fini_memkind(); }
kmp_runtime.cpp:_ZL21__kmp_reg_status_namev:
 6701|      2|static inline char *__kmp_reg_status_name() {
 6702|       |/* On RHEL 3u5 if linked statically, getpid() returns different values in
 6703|       |   each thread. If registration and unregistration go in different threads
 6704|       |   (omp_misc_other_root_exit.cpp test case), the name of registered_lib_env
 6705|       |   env var can not be found, because the name will contain different pid. */
 6706|       |// macOS* complains about name being too long with additional getuid()
 6707|       |#if KMP_OS_UNIX && !KMP_OS_DARWIN && KMP_DYNAMIC_LIB
 6708|       |  return __kmp_str_format("__KMP_REGISTERED_LIB_%d_%d", (int)getpid(),
 6709|       |                          (int)getuid());
 6710|       |#else
 6711|      2|  return __kmp_str_format("__KMP_REGISTERED_LIB_%d", (int)getpid());
 6712|      2|#endif
 6713|      2|} // __kmp_reg_status_get
kmp_runtime.cpp:_ZL26__kmp_do_serial_initializev:
 7006|      1|static void __kmp_do_serial_initialize(void) {
 7007|      1|  int i, gtid;
 7008|      1|  size_t size;
 7009|       |
 7010|      1|  KA_TRACE(10, ("__kmp_do_serial_initialize: enter\n"));
 7011|       |
 7012|      1|  KMP_DEBUG_ASSERT(sizeof(kmp_int32) == 4);
 7013|      1|  KMP_DEBUG_ASSERT(sizeof(kmp_uint32) == 4);
 7014|      1|  KMP_DEBUG_ASSERT(sizeof(kmp_int64) == 8);
 7015|      1|  KMP_DEBUG_ASSERT(sizeof(kmp_uint64) == 8);
 7016|      1|  KMP_DEBUG_ASSERT(sizeof(kmp_intptr_t) == sizeof(void *));
 7017|       |
 7018|      1|#if OMPT_SUPPORT
 7019|      1|  ompt_pre_init();
 7020|      1|#endif
 7021|      1|#if OMPD_SUPPORT
 7022|      1|  __kmp_env_dump();
 7023|      1|  ompd_init();
 7024|      1|#endif
 7025|       |
 7026|      1|  __kmp_validate_locks();
 7027|       |
 7028|       |#if ENABLE_LIBOMPTARGET
 7029|       |  /* Initialize functions from libomptarget */
 7030|       |  __kmp_init_omptarget();
 7031|       |#endif
 7032|       |
 7033|       |  /* Initialize internal memory allocator */
 7034|      1|  __kmp_init_allocator();
 7035|       |
 7036|       |  /* Register the library startup via an environment variable or via mapped
 7037|       |     shared memory file and check to see whether another copy of the library is
 7038|       |     already registered. Since forked child process is often terminated, we
 7039|       |     postpone the registration till middle initialization in the child */
 7040|      1|  if (__kmp_need_register_serial)
  ------------------
  |  Branch (7040:7): [True: 1, False: 0]
  ------------------
 7041|      1|    __kmp_register_library_startup();
 7042|       |
 7043|       |  /* TODO reinitialization of library */
 7044|      1|  if (TCR_4(__kmp_global.g.g_done)) {
  ------------------
  |  | 1127|      1|#define TCR_4(a) (a)
  |  |  ------------------
  |  |  |  Branch (1127:18): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 7045|      0|    KA_TRACE(10, ("__kmp_do_serial_initialize: reinitialization of library\n"));
 7046|      0|  }
 7047|       |
 7048|      1|  __kmp_global.g.g_abort = 0;
 7049|      1|  TCW_SYNC_4(__kmp_global.g.g_done, FALSE);
  ------------------
  |  | 1136|      1|#define TCW_SYNC_4(a, b) (a) = (b)
  ------------------
 7050|       |
 7051|       |/* initialize the locks */
 7052|      1|#if KMP_USE_ADAPTIVE_LOCKS
 7053|       |#if KMP_DEBUG_ADAPTIVE_LOCKS
 7054|       |  __kmp_init_speculative_stats();
 7055|       |#endif
 7056|      1|#endif
 7057|       |#if KMP_STATS_ENABLED
 7058|       |  __kmp_stats_init();
 7059|       |#endif
 7060|      1|  __kmp_init_lock(&__kmp_global_lock);
 7061|      1|  __kmp_init_queuing_lock(&__kmp_dispatch_lock);
 7062|      1|  __kmp_init_lock(&__kmp_debug_lock);
 7063|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock);
 7064|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_1i);
 7065|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_2i);
 7066|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_4i);
 7067|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_4r);
 7068|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_8i);
 7069|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_8r);
 7070|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_8c);
 7071|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_10r);
 7072|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_16r);
 7073|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_16c);
 7074|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_20c);
 7075|      1|  __kmp_init_atomic_lock(&__kmp_atomic_lock_32c);
 7076|      1|  __kmp_init_bootstrap_lock(&__kmp_forkjoin_lock);
 7077|      1|  __kmp_init_bootstrap_lock(&__kmp_exit_lock);
 7078|       |#if KMP_USE_MONITOR
 7079|       |  __kmp_init_bootstrap_lock(&__kmp_monitor_lock);
 7080|       |#endif
 7081|      1|  __kmp_init_bootstrap_lock(&__kmp_tp_cached_lock);
 7082|       |
 7083|       |  /* conduct initialization and initial setup of configuration */
 7084|       |
 7085|      1|  __kmp_runtime_initialize();
 7086|       |
 7087|      1|#if KMP_MIC_SUPPORTED
 7088|      1|  __kmp_check_mic_type();
 7089|      1|#endif
 7090|       |
 7091|       |// Some global variable initialization moved here from kmp_env_initialize()
 7092|       |#ifdef KMP_DEBUG
 7093|       |  kmp_diag = 0;
 7094|       |#endif
 7095|      1|  __kmp_abort_delay = 0;
 7096|       |
 7097|       |  // From __kmp_init_dflt_team_nth()
 7098|       |  /* assume the entire machine will be used */
 7099|      1|  __kmp_dflt_team_nth_ub = __kmp_xproc;
 7100|      1|  if (__kmp_dflt_team_nth_ub < KMP_MIN_NTH) {
  ------------------
  |  | 1137|      1|#define KMP_MIN_NTH 1
  ------------------
  |  Branch (7100:7): [True: 0, False: 1]
  ------------------
 7101|      0|    __kmp_dflt_team_nth_ub = KMP_MIN_NTH;
  ------------------
  |  | 1137|      0|#define KMP_MIN_NTH 1
  ------------------
 7102|      0|  }
 7103|      1|  if (__kmp_dflt_team_nth_ub > __kmp_sys_max_nth) {
  ------------------
  |  Branch (7103:7): [True: 0, False: 1]
  ------------------
 7104|      0|    __kmp_dflt_team_nth_ub = __kmp_sys_max_nth;
 7105|      0|  }
 7106|      1|  __kmp_max_nth = __kmp_sys_max_nth;
 7107|      1|  __kmp_cg_max_nth = __kmp_sys_max_nth;
 7108|      1|  __kmp_teams_max_nth = __kmp_xproc; // set a "reasonable" default
 7109|      1|  if (__kmp_teams_max_nth > __kmp_sys_max_nth) {
  ------------------
  |  Branch (7109:7): [True: 0, False: 1]
  ------------------
 7110|      0|    __kmp_teams_max_nth = __kmp_sys_max_nth;
 7111|      0|  }
 7112|       |
 7113|       |  // Three vars below moved here from __kmp_env_initialize() "KMP_BLOCKTIME"
 7114|       |  // part
 7115|      1|  __kmp_dflt_blocktime = KMP_DEFAULT_BLOCKTIME;
  ------------------
  |  | 1187|      1|#define KMP_DEFAULT_BLOCKTIME (__kmp_is_hybrid_cpu() ? (0) : (200))
  |  |  ------------------
  |  |  |  Branch (1187:32): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 7116|       |#if KMP_USE_MONITOR
 7117|       |  __kmp_monitor_wakeups =
 7118|       |      KMP_WAKEUPS_FROM_BLOCKTIME(__kmp_dflt_blocktime, __kmp_monitor_wakeups);
 7119|       |  __kmp_bt_intervals =
 7120|       |      KMP_INTERVALS_FROM_BLOCKTIME(__kmp_dflt_blocktime, __kmp_monitor_wakeups);
 7121|       |#endif
 7122|       |  // From "KMP_LIBRARY" part of __kmp_env_initialize()
 7123|      1|  __kmp_library = library_throughput;
 7124|       |  // From KMP_SCHEDULE initialization
 7125|      1|  __kmp_static = kmp_sch_static_balanced;
 7126|       |// AC: do not use analytical here, because it is non-monotonous
 7127|       |//__kmp_guided = kmp_sch_guided_iterative_chunked;
 7128|       |//__kmp_auto = kmp_sch_guided_analytical_chunked; // AC: it is the default, no
 7129|       |// need to repeat assignment
 7130|       |// Barrier initialization. Moved here from __kmp_env_initialize() Barrier branch
 7131|       |// bit control and barrier method control parts
 7132|      1|#if KMP_FAST_REDUCTION_BARRIER
 7133|      1|#define kmp_reduction_barrier_gather_bb ((int)1)
 7134|      1|#define kmp_reduction_barrier_release_bb ((int)1)
 7135|      1|#define kmp_reduction_barrier_gather_pat __kmp_barrier_gather_pat_dflt
 7136|      1|#define kmp_reduction_barrier_release_pat __kmp_barrier_release_pat_dflt
 7137|      1|#endif // KMP_FAST_REDUCTION_BARRIER
 7138|      4|  for (i = bs_plain_barrier; i < bs_last_barrier; i++) {
  ------------------
  |  Branch (7138:30): [True: 3, False: 1]
  ------------------
 7139|      3|    __kmp_barrier_gather_branch_bits[i] = __kmp_barrier_gather_bb_dflt;
 7140|      3|    __kmp_barrier_release_branch_bits[i] = __kmp_barrier_release_bb_dflt;
 7141|      3|    __kmp_barrier_gather_pattern[i] = __kmp_barrier_gather_pat_dflt;
 7142|      3|    __kmp_barrier_release_pattern[i] = __kmp_barrier_release_pat_dflt;
 7143|      3|#if KMP_FAST_REDUCTION_BARRIER
 7144|      3|    if (i == bs_reduction_barrier) { // tested and confirmed on ALTIX only (
  ------------------
  |  Branch (7144:9): [True: 1, False: 2]
  ------------------
 7145|       |      // lin_64 ): hyper,1
 7146|      1|      __kmp_barrier_gather_branch_bits[i] = kmp_reduction_barrier_gather_bb;
  ------------------
  |  | 7133|      1|#define kmp_reduction_barrier_gather_bb ((int)1)
  ------------------
 7147|      1|      __kmp_barrier_release_branch_bits[i] = kmp_reduction_barrier_release_bb;
  ------------------
  |  | 7134|      1|#define kmp_reduction_barrier_release_bb ((int)1)
  ------------------
 7148|      1|      __kmp_barrier_gather_pattern[i] = kmp_reduction_barrier_gather_pat;
  ------------------
  |  | 7135|      1|#define kmp_reduction_barrier_gather_pat __kmp_barrier_gather_pat_dflt
  ------------------
 7149|      1|      __kmp_barrier_release_pattern[i] = kmp_reduction_barrier_release_pat;
  ------------------
  |  | 7136|      1|#define kmp_reduction_barrier_release_pat __kmp_barrier_release_pat_dflt
  ------------------
 7150|      1|    }
 7151|      3|#endif // KMP_FAST_REDUCTION_BARRIER
 7152|      3|  }
 7153|      1|#if KMP_FAST_REDUCTION_BARRIER
 7154|      1|#undef kmp_reduction_barrier_release_pat
 7155|      1|#undef kmp_reduction_barrier_gather_pat
 7156|      1|#undef kmp_reduction_barrier_release_bb
 7157|      1|#undef kmp_reduction_barrier_gather_bb
 7158|      1|#endif // KMP_FAST_REDUCTION_BARRIER
 7159|      1|#if KMP_MIC_SUPPORTED
 7160|      1|  if (__kmp_mic_type == mic2) { // KNC
  ------------------
  |  Branch (7160:7): [True: 0, False: 1]
  ------------------
 7161|       |    // AC: plane=3,2, forkjoin=2,1 are optimal for 240 threads on KNC
 7162|      0|    __kmp_barrier_gather_branch_bits[bs_plain_barrier] = 3; // plain gather
 7163|      0|    __kmp_barrier_release_branch_bits[bs_forkjoin_barrier] =
 7164|      0|        1; // forkjoin release
 7165|      0|    __kmp_barrier_gather_pattern[bs_forkjoin_barrier] = bp_hierarchical_bar;
 7166|      0|    __kmp_barrier_release_pattern[bs_forkjoin_barrier] = bp_hierarchical_bar;
 7167|      0|  }
 7168|      1|#if KMP_FAST_REDUCTION_BARRIER
 7169|      1|  if (__kmp_mic_type == mic2) { // KNC
  ------------------
  |  Branch (7169:7): [True: 0, False: 1]
  ------------------
 7170|      0|    __kmp_barrier_gather_pattern[bs_reduction_barrier] = bp_hierarchical_bar;
 7171|      0|    __kmp_barrier_release_pattern[bs_reduction_barrier] = bp_hierarchical_bar;
 7172|      0|  }
 7173|      1|#endif // KMP_FAST_REDUCTION_BARRIER
 7174|      1|#endif // KMP_MIC_SUPPORTED
 7175|       |
 7176|       |// From KMP_CHECKS initialization
 7177|       |#ifdef KMP_DEBUG
 7178|       |  __kmp_env_checks = TRUE; /* development versions have the extra checks */
 7179|       |#else
 7180|      1|  __kmp_env_checks = FALSE; /* port versions do not have the extra checks */
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 7181|      1|#endif
 7182|       |
 7183|       |  // From "KMP_FOREIGN_THREADS_THREADPRIVATE" initialization
 7184|      1|  __kmp_foreign_tp = TRUE;
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 7185|       |
 7186|      1|  __kmp_global.g.g_dynamic = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 7187|      1|  __kmp_global.g.g_dynamic_mode = dynamic_default;
 7188|       |
 7189|      1|  __kmp_init_nesting_mode();
 7190|       |
 7191|      1|  __kmp_env_initialize(NULL);
 7192|       |
 7193|      1|#if KMP_HAVE_MWAIT || KMP_HAVE_UMWAIT
 7194|      1|  __kmp_user_level_mwait_init();
 7195|      1|#endif
 7196|       |// Print all messages in message catalog for testing purposes.
 7197|       |#ifdef KMP_DEBUG
 7198|       |  char const *val = __kmp_env_get("KMP_DUMP_CATALOG");
 7199|       |  if (__kmp_str_match_true(val)) {
 7200|       |    kmp_str_buf_t buffer;
 7201|       |    __kmp_str_buf_init(&buffer);
 7202|       |    __kmp_i18n_dump_catalog(&buffer);
 7203|       |    __kmp_printf("%s", buffer.str);
 7204|       |    __kmp_str_buf_free(&buffer);
 7205|       |  }
 7206|       |  __kmp_env_free(&val);
 7207|       |#endif
 7208|       |
 7209|      1|  __kmp_threads_capacity =
 7210|      1|      __kmp_initial_threads_capacity(__kmp_dflt_team_nth_ub);
 7211|       |  // Moved here from __kmp_env_initialize() "KMP_ALL_THREADPRIVATE" part
 7212|      1|  __kmp_tp_capacity = __kmp_default_tp_capacity(
 7213|      1|      __kmp_dflt_team_nth_ub, __kmp_max_nth, __kmp_allThreadsSpecified);
 7214|       |
 7215|       |  // If the library is shut down properly, both pools must be NULL. Just in
 7216|       |  // case, set them to NULL -- some memory may leak, but subsequent code will
 7217|       |  // work even if pools are not freed.
 7218|      1|  KMP_DEBUG_ASSERT(__kmp_thread_pool == NULL);
 7219|      1|  KMP_DEBUG_ASSERT(__kmp_thread_pool_insert_pt == NULL);
 7220|      1|  KMP_DEBUG_ASSERT(__kmp_team_pool == NULL);
 7221|      1|  __kmp_thread_pool = NULL;
 7222|      1|  __kmp_thread_pool_insert_pt = NULL;
 7223|      1|  __kmp_team_pool = NULL;
 7224|       |
 7225|       |  /* Allocate all of the variable sized records */
 7226|       |  /* NOTE: __kmp_threads_capacity entries are allocated, but the arrays are
 7227|       |   * expandable */
 7228|       |  /* Since allocation is cache-aligned, just add extra padding at the end */
 7229|      1|  size =
 7230|      1|      (sizeof(kmp_info_t *) + sizeof(kmp_root_t *)) * __kmp_threads_capacity +
 7231|      1|      CACHE_LINE;
  ------------------
  |  |  108|      1|# define CACHE_LINE 64
  ------------------
 7232|      1|  __kmp_threads = (kmp_info_t **)__kmp_allocate(size);
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 7233|      1|  __kmp_root = (kmp_root_t **)((char *)__kmp_threads +
 7234|      1|                               sizeof(kmp_info_t *) * __kmp_threads_capacity);
 7235|       |
 7236|       |  /* init thread counts */
 7237|      1|  KMP_DEBUG_ASSERT(__kmp_all_nth ==
 7238|      1|                   0); // Asserts fail if the library is reinitializing and
 7239|      1|  KMP_DEBUG_ASSERT(__kmp_nth == 0); // something was wrong in termination.
 7240|      1|  __kmp_all_nth = 0;
 7241|      1|  __kmp_nth = 0;
 7242|       |
 7243|       |  /* setup the uber master thread and hierarchy */
 7244|      1|  gtid = __kmp_register_root(TRUE);
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 7245|      1|  KA_TRACE(10, ("__kmp_do_serial_initialize  T#%d\n", gtid));
 7246|      1|  KMP_ASSERT(KMP_UBER_GTID(gtid));
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 7247|      1|  KMP_ASSERT(KMP_INITIAL_GTID(gtid));
  ------------------
  |  |   50|      1|  if (!(cond)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   51|      0|    __kmp_debug_assert("assertion failure", __FILE__, __LINE__);               \
  |  |   52|      0|  }
  ------------------
 7248|       |
 7249|      1|  KMP_MB(); /* Flush all pending memory write invalidates.  */
 7250|       |
 7251|      1|  __kmp_common_initialize();
 7252|       |
 7253|      1|#if KMP_OS_UNIX
 7254|       |  /* invoke the child fork handler */
 7255|      1|  __kmp_register_atfork();
 7256|      1|#endif
 7257|       |
 7258|      1|#if !KMP_DYNAMIC_LIB ||                                                        \
 7259|      1|    ((KMP_COMPILER_ICC || KMP_COMPILER_ICX) && KMP_OS_DARWIN)
 7260|      1|  {
 7261|       |    /* Invoke the exit handler when the program finishes, only for static
 7262|       |       library and macOS* dynamic. For other dynamic libraries, we already
 7263|       |       have _fini and DllMain. */
 7264|      1|    int rc = atexit(__kmp_internal_end_atexit);
 7265|      1|    if (rc != 0) {
  ------------------
  |  Branch (7265:9): [True: 0, False: 1]
  ------------------
 7266|      0|      __kmp_fatal(KMP_MSG(FunctionError, "atexit()"), KMP_ERR(rc),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                    __kmp_fatal(KMP_MSG(FunctionError, "atexit()"), KMP_ERR(rc),
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
 7267|      0|                  __kmp_msg_null);
 7268|      0|    }
 7269|      1|  }
 7270|      1|#endif
 7271|       |
 7272|      1|#if KMP_HANDLE_SIGNALS
 7273|      1|#if KMP_OS_UNIX
 7274|       |  /* NOTE: make sure that this is called before the user installs their own
 7275|       |     signal handlers so that the user handlers are called first. this way they
 7276|       |     can return false, not call our handler, avoid terminating the library, and
 7277|       |     continue execution where they left off. */
 7278|      1|  __kmp_install_signals(FALSE);
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 7279|      1|#endif /* KMP_OS_UNIX */
 7280|       |#if KMP_OS_WINDOWS
 7281|       |  __kmp_install_signals(TRUE);
 7282|       |#endif /* KMP_OS_WINDOWS */
 7283|      1|#endif
 7284|       |
 7285|       |  /* we have finished the serial initialization */
 7286|      1|  __kmp_init_counter++;
 7287|       |
 7288|      1|  __kmp_init_serial = TRUE;
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 7289|       |
 7290|      1|  if (__kmp_version) {
  ------------------
  |  Branch (7290:7): [True: 0, False: 1]
  ------------------
 7291|      0|    __kmp_print_version_1();
 7292|      0|  }
 7293|       |
 7294|      1|  if (__kmp_settings) {
  ------------------
  |  Branch (7294:7): [True: 0, False: 1]
  ------------------
 7295|      0|    __kmp_env_print();
 7296|      0|  }
 7297|       |
 7298|      1|  if (__kmp_display_env || __kmp_display_env_verbose) {
  ------------------
  |  Branch (7298:7): [True: 0, False: 1]
  |  Branch (7298:28): [True: 0, False: 1]
  ------------------
 7299|      0|    __kmp_env_print_2();
 7300|      0|  }
 7301|       |
 7302|      1|#if OMPT_SUPPORT
 7303|      1|  ompt_post_init();
 7304|      1|#endif
 7305|       |
 7306|      1|  KMP_MB();
 7307|       |
 7308|      1|  KA_TRACE(10, ("__kmp_do_serial_initialize: exit\n"));
 7309|      1|}
kmp_runtime.cpp:_ZL20__kmp_init_allocatorv:
  550|      1|static void __kmp_init_allocator() {
  551|      1|  __kmp_init_memkind();
  552|      1|  __kmp_init_target_mem();
  553|      1|}
kmp_runtime.cpp:_ZL20__kmp_check_mic_typev:
 6946|      1|static void __kmp_check_mic_type() {
 6947|      1|  kmp_cpuid_t cpuid_state = {0};
 6948|      1|  kmp_cpuid_t *cs_p = &cpuid_state;
 6949|      1|  __kmp_x86_cpuid(1, 0, cs_p);
 6950|       |  // We don't support mic1 at the moment
 6951|      1|  if ((cs_p->eax & 0xff0) == 0xB10) {
  ------------------
  |  Branch (6951:7): [True: 0, False: 1]
  ------------------
 6952|      0|    __kmp_mic_type = mic2;
 6953|      1|  } else if ((cs_p->eax & 0xf0ff0) == 0x50670) {
  ------------------
  |  Branch (6953:14): [True: 0, False: 1]
  ------------------
 6954|      0|    __kmp_mic_type = mic3;
 6955|      1|  } else {
 6956|      1|    __kmp_mic_type = non_mic;
 6957|      1|  }
 6958|      1|}
kmp_runtime.cpp:_ZL27__kmp_user_level_mwait_initv:
 6963|      1|static void __kmp_user_level_mwait_init() {
 6964|      1|  struct kmp_cpuid buf;
 6965|      1|  __kmp_x86_cpuid(7, 0, &buf);
 6966|      1|  __kmp_waitpkg_enabled = ((buf.ecx >> 5) & 1);
 6967|      1|  __kmp_umwait_enabled = __kmp_waitpkg_enabled && __kmp_user_level_mwait;
  ------------------
  |  Branch (6967:26): [True: 0, False: 1]
  |  Branch (6967:51): [True: 0, False: 0]
  ------------------
 6968|      1|  __kmp_tpause_enabled = __kmp_waitpkg_enabled && (__kmp_tpause_state > 0);
  ------------------
  |  Branch (6968:26): [True: 0, False: 1]
  |  Branch (6968:51): [True: 0, False: 0]
  ------------------
 6969|      1|  KF_TRACE(30, ("__kmp_user_level_mwait_init: __kmp_umwait_enabled = %d\n",
 6970|      1|                __kmp_umwait_enabled));
 6971|      1|}

__kmp_check_stksize:
  320|      1|void __kmp_check_stksize(size_t *val) {
  321|       |  // if system stack size is too big then limit the size for worker threads
  322|      1|  if (*val > KMP_DEFAULT_STKSIZE * 16) // just a heuristics...
  ------------------
  |  | 1158|      1|#define KMP_DEFAULT_STKSIZE ((size_t)(4 * 1024 * 1024))
  ------------------
  |  Branch (322:7): [True: 0, False: 1]
  ------------------
  323|      0|    *val = KMP_DEFAULT_STKSIZE * 16;
  ------------------
  |  | 1158|      0|#define KMP_DEFAULT_STKSIZE ((size_t)(4 * 1024 * 1024))
  ------------------
  324|      1|  if (*val < __kmp_sys_min_stksize)
  ------------------
  |  Branch (324:7): [True: 0, False: 1]
  ------------------
  325|      0|    *val = __kmp_sys_min_stksize;
  326|      1|  if (*val > KMP_MAX_STKSIZE)
  ------------------
  |  | 1153|      1|#define KMP_MAX_STKSIZE (~((size_t)1 << ((sizeof(size_t) * (1 << 3)) - 1)))
  ------------------
  |  Branch (326:7): [True: 0, False: 1]
  ------------------
  327|      0|    *val = KMP_MAX_STKSIZE; // dead code currently, but may work in future
  ------------------
  |  | 1153|      0|#define KMP_MAX_STKSIZE (~((size_t)1 << ((sizeof(size_t) * (1 << 3)) - 1)))
  ------------------
  328|       |#if KMP_OS_DARWIN
  329|       |  *val = __kmp_round4k(*val);
  330|       |#endif // KMP_OS_DARWIN
  331|      1|}
_Z30__kmp_initial_threads_capacityi:
  536|      2|int __kmp_initial_threads_capacity(int req_nproc) {
  537|      2|  int nth = 32;
  538|       |
  539|       |  /* MIN( MAX( 32, 4 * $OMP_NUM_THREADS, 4 * omp_get_num_procs() ),
  540|       |   * __kmp_max_nth) */
  541|      2|  if (nth < (4 * req_nproc))
  ------------------
  |  Branch (541:7): [True: 2, False: 0]
  ------------------
  542|      2|    nth = (4 * req_nproc);
  543|      2|  if (nth < (4 * __kmp_xproc))
  ------------------
  |  Branch (543:7): [True: 0, False: 2]
  ------------------
  544|      0|    nth = (4 * __kmp_xproc);
  545|       |
  546|       |  // If hidden helper task is enabled, we initialize the thread capacity with
  547|       |  // extra __kmp_hidden_helper_threads_num.
  548|      2|  if (__kmp_enable_hidden_helper) {
  ------------------
  |  Branch (548:7): [True: 2, False: 0]
  ------------------
  549|      2|    nth += __kmp_hidden_helper_threads_num;
  550|      2|  }
  551|       |
  552|      2|  if (nth > __kmp_max_nth)
  ------------------
  |  Branch (552:7): [True: 0, False: 2]
  ------------------
  553|      0|    nth = __kmp_max_nth;
  554|       |
  555|      2|  return nth;
  556|      2|}
_Z25__kmp_default_tp_capacityiii:
  559|      1|                              int all_threads_specified) {
  560|      1|  int nth = 128;
  561|       |
  562|      1|  if (all_threads_specified)
  ------------------
  |  Branch (562:7): [True: 0, False: 1]
  ------------------
  563|      0|    return max_nth;
  564|       |  /* MIN( MAX (128, 4 * $OMP_NUM_THREADS, 4 * omp_get_num_procs() ),
  565|       |   * __kmp_max_nth ) */
  566|      1|  if (nth < (4 * req_nproc))
  ------------------
  |  Branch (566:7): [True: 0, False: 1]
  ------------------
  567|      0|    nth = (4 * req_nproc);
  568|      1|  if (nth < (4 * __kmp_xproc))
  ------------------
  |  Branch (568:7): [True: 0, False: 1]
  ------------------
  569|      0|    nth = (4 * __kmp_xproc);
  570|       |
  571|      1|  if (nth > __kmp_max_nth)
  ------------------
  |  Branch (571:7): [True: 0, False: 1]
  ------------------
  572|      0|    nth = __kmp_max_nth;
  573|       |
  574|      1|  return nth;
  575|      1|}
_Z20__kmp_env_initializePKc:
 6003|      1|void __kmp_env_initialize(char const *string) {
 6004|       |
 6005|      1|  kmp_env_blk_t block;
 6006|      1|  int i;
 6007|       |
 6008|      1|  __kmp_stg_init();
 6009|       |
 6010|       |  // Hack!!!
 6011|      1|  if (string == NULL) {
  ------------------
  |  Branch (6011:7): [True: 1, False: 0]
  ------------------
 6012|       |    // __kmp_max_nth = __kmp_sys_max_nth;
 6013|      1|    __kmp_threads_capacity =
 6014|      1|        __kmp_initial_threads_capacity(__kmp_dflt_team_nth_ub);
 6015|      1|  }
 6016|      1|  __kmp_env_blk_init(&block, string);
 6017|       |
 6018|       |  // update the set flag on all entries that have an env var
 6019|     35|  for (i = 0; i < block.count; ++i) {
  ------------------
  |  Branch (6019:15): [True: 34, False: 1]
  ------------------
 6020|     34|    if ((block.vars[i].name == NULL) || (*block.vars[i].name == '\0')) {
  ------------------
  |  Branch (6020:9): [True: 0, False: 34]
  |  Branch (6020:41): [True: 0, False: 34]
  ------------------
 6021|      0|      continue;
 6022|      0|    }
 6023|     34|    if (block.vars[i].value == NULL) {
  ------------------
  |  Branch (6023:9): [True: 0, False: 34]
  ------------------
 6024|      0|      continue;
 6025|      0|    }
 6026|     34|    kmp_setting_t *setting = __kmp_stg_find(block.vars[i].name);
 6027|     34|    if (setting != NULL) {
  ------------------
  |  Branch (6027:9): [True: 0, False: 34]
  ------------------
 6028|      0|      setting->set = 1;
 6029|      0|    }
 6030|     34|  }
 6031|       |
 6032|       |  // We need to know if blocktime was set when processing OMP_WAIT_POLICY
 6033|      1|  blocktime_str = __kmp_env_blk_var(&block, "KMP_BLOCKTIME");
 6034|       |
 6035|       |  // Special case. If we parse environment, not a string, process KMP_WARNINGS
 6036|       |  // first.
 6037|      1|  if (string == NULL) {
  ------------------
  |  Branch (6037:7): [True: 1, False: 0]
  ------------------
 6038|      1|    char const *name = "KMP_WARNINGS";
 6039|      1|    char const *value = __kmp_env_blk_var(&block, name);
 6040|      1|    __kmp_stg_parse(name, value);
 6041|      1|  }
 6042|       |
 6043|      1|#if KMP_AFFINITY_SUPPORTED
 6044|       |  // Special case. KMP_AFFINITY is not a rival to other affinity env vars
 6045|       |  // if no affinity type is specified.  We want to allow
 6046|       |  // KMP_AFFINITY=[no],verbose/[no]warnings/etc.  to be enabled when
 6047|       |  // specifying the affinity type via GOMP_CPU_AFFINITY or the OMP 4.0
 6048|       |  // affinity mechanism.
 6049|      1|  __kmp_affinity_notype = NULL;
 6050|      1|  char const *aff_str = __kmp_env_blk_var(&block, "KMP_AFFINITY");
 6051|      1|  if (aff_str != NULL) {
  ------------------
  |  Branch (6051:7): [True: 0, False: 1]
  ------------------
 6052|       |    // Check if the KMP_AFFINITY type is specified in the string.
 6053|       |    // We just search the string for "compact", "scatter", etc.
 6054|       |    // without really parsing the string.  The syntax of the
 6055|       |    // KMP_AFFINITY env var is such that none of the affinity
 6056|       |    // type names can appear anywhere other that the type
 6057|       |    // specifier, even as substrings.
 6058|       |    //
 6059|       |    // I can't find a case-insensitive version of strstr on Windows* OS.
 6060|       |    // Use the case-sensitive version for now.
 6061|       |
 6062|       |#if KMP_OS_WINDOWS
 6063|       |#define FIND strstr
 6064|       |#else
 6065|      0|#define FIND strcasestr
 6066|      0|#endif
 6067|       |
 6068|      0|    if ((FIND(aff_str, "none") == NULL) &&
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6068:9): [True: 0, False: 0]
  ------------------
 6069|      0|        (FIND(aff_str, "physical") == NULL) &&
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6069:9): [True: 0, False: 0]
  ------------------
 6070|      0|        (FIND(aff_str, "logical") == NULL) &&
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6070:9): [True: 0, False: 0]
  ------------------
 6071|      0|        (FIND(aff_str, "compact") == NULL) &&
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6071:9): [True: 0, False: 0]
  ------------------
 6072|      0|        (FIND(aff_str, "scatter") == NULL) &&
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6072:9): [True: 0, False: 0]
  ------------------
 6073|      0|        (FIND(aff_str, "explicit") == NULL) &&
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6073:9): [True: 0, False: 0]
  ------------------
 6074|      0|        (FIND(aff_str, "balanced") == NULL) &&
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6074:9): [True: 0, False: 0]
  ------------------
 6075|      0|        (FIND(aff_str, "disabled") == NULL)) {
  ------------------
  |  | 6065|      0|#define FIND strcasestr
  ------------------
  |  Branch (6075:9): [True: 0, False: 0]
  ------------------
 6076|      0|      __kmp_affinity_notype = __kmp_stg_find("KMP_AFFINITY");
 6077|      0|    } else {
 6078|       |      // A new affinity type is specified.
 6079|       |      // Reset the affinity flags to their default values,
 6080|       |      // in case this is called from kmp_set_defaults().
 6081|      0|      __kmp_affinity.type = affinity_default;
 6082|      0|      __kmp_affinity.gran = KMP_HW_UNKNOWN;
 6083|      0|      __kmp_affinity_top_method = affinity_top_method_default;
 6084|      0|      __kmp_affinity.flags.respect = affinity_respect_mask_default;
  ------------------
  |  |  860|      0|#define affinity_respect_mask_default (2)
  ------------------
 6085|      0|    }
 6086|      0|#undef FIND
 6087|       |
 6088|       |    // Also reset the affinity flags if OMP_PROC_BIND is specified.
 6089|      0|    aff_str = __kmp_env_blk_var(&block, "OMP_PROC_BIND");
 6090|      0|    if (aff_str != NULL) {
  ------------------
  |  Branch (6090:9): [True: 0, False: 0]
  ------------------
 6091|      0|      __kmp_affinity.type = affinity_default;
 6092|      0|      __kmp_affinity.gran = KMP_HW_UNKNOWN;
 6093|      0|      __kmp_affinity_top_method = affinity_top_method_default;
 6094|      0|      __kmp_affinity.flags.respect = affinity_respect_mask_default;
  ------------------
  |  |  860|      0|#define affinity_respect_mask_default (2)
  ------------------
 6095|      0|    }
 6096|      0|  }
 6097|       |
 6098|      1|#endif /* KMP_AFFINITY_SUPPORTED */
 6099|       |
 6100|       |  // Set up the nested proc bind type vector.
 6101|      1|  if (__kmp_nested_proc_bind.bind_types == NULL) {
  ------------------
  |  Branch (6101:7): [True: 1, False: 0]
  ------------------
 6102|      1|    __kmp_nested_proc_bind.bind_types =
 6103|      1|        (kmp_proc_bind_t *)KMP_INTERNAL_MALLOC(sizeof(kmp_proc_bind_t));
  ------------------
  |  |  110|      1|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
 6104|      1|    if (__kmp_nested_proc_bind.bind_types == NULL) {
  ------------------
  |  Branch (6104:9): [True: 0, False: 1]
  ------------------
 6105|      0|      KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
 6106|      0|    }
 6107|      1|    __kmp_nested_proc_bind.size = 1;
 6108|      1|    __kmp_nested_proc_bind.used = 1;
 6109|      1|#if KMP_AFFINITY_SUPPORTED
 6110|      1|    __kmp_nested_proc_bind.bind_types[0] = proc_bind_default;
 6111|       |#else
 6112|       |    // default proc bind is false if affinity not supported
 6113|       |    __kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
 6114|       |#endif
 6115|      1|  }
 6116|       |
 6117|       |  // Set up the affinity format ICV
 6118|       |  // Grab the default affinity format string from the message catalog
 6119|      1|  kmp_msg_t m =
 6120|      1|      __kmp_msg_format(kmp_i18n_msg_AffFormatDefault, "%P", "%i", "%n", "%A");
 6121|      1|  KMP_DEBUG_ASSERT(KMP_STRLEN(m.str) < KMP_AFFINITY_FORMAT_SIZE);
 6122|       |
 6123|      1|  if (__kmp_affinity_format == NULL) {
  ------------------
  |  Branch (6123:7): [True: 1, False: 0]
  ------------------
 6124|      1|    __kmp_affinity_format =
 6125|      1|        (char *)KMP_INTERNAL_MALLOC(sizeof(char) * KMP_AFFINITY_FORMAT_SIZE);
  ------------------
  |  |  110|      1|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
 6126|      1|  }
 6127|      1|  KMP_STRCPY_S(__kmp_affinity_format, KMP_AFFINITY_FORMAT_SIZE, m.str);
  ------------------
  |  |   63|      1|#define KMP_STRCPY_S(dst, bsz, src) strcpy(dst, src)
  ------------------
 6128|      1|  __kmp_str_free(&m.str);
 6129|       |
 6130|       |  // Now process all of the settings.
 6131|     35|  for (i = 0; i < block.count; ++i) {
  ------------------
  |  Branch (6131:15): [True: 34, False: 1]
  ------------------
 6132|     34|    __kmp_stg_parse(block.vars[i].name, block.vars[i].value);
 6133|     34|  }
 6134|       |
 6135|       |  // If user locks have been allocated yet, don't reset the lock vptr table.
 6136|      1|  if (!__kmp_init_user_locks) {
  ------------------
  |  Branch (6136:7): [True: 1, False: 0]
  ------------------
 6137|      1|    if (__kmp_user_lock_kind == lk_default) {
  ------------------
  |  Branch (6137:9): [True: 1, False: 0]
  ------------------
 6138|      1|      __kmp_user_lock_kind = lk_queuing;
 6139|      1|    }
 6140|      1|#if KMP_USE_DYNAMIC_LOCK
 6141|      1|    __kmp_init_dynamic_user_locks();
 6142|       |#else
 6143|       |    __kmp_set_user_lock_vptrs(__kmp_user_lock_kind);
 6144|       |#endif
 6145|      1|  } else {
 6146|      0|    KMP_DEBUG_ASSERT(string != NULL); // kmp_set_defaults() was called
 6147|      0|    KMP_DEBUG_ASSERT(__kmp_user_lock_kind != lk_default);
 6148|       |// Binds lock functions again to follow the transition between different
 6149|       |// KMP_CONSISTENCY_CHECK values. Calling this again is harmless as long
 6150|       |// as we do not allow lock kind changes after making a call to any
 6151|       |// user lock functions (true).
 6152|      0|#if KMP_USE_DYNAMIC_LOCK
 6153|      0|    __kmp_init_dynamic_user_locks();
 6154|       |#else
 6155|       |    __kmp_set_user_lock_vptrs(__kmp_user_lock_kind);
 6156|       |#endif
 6157|      0|  }
 6158|       |
 6159|      1|#if KMP_AFFINITY_SUPPORTED
 6160|       |
 6161|      1|  if (!TCR_4(__kmp_init_middle)) {
  ------------------
  |  | 1127|      1|#define TCR_4(a) (a)
  ------------------
  |  Branch (6161:7): [True: 1, False: 0]
  ------------------
 6162|       |#if KMP_USE_HWLOC
 6163|       |    // Force using hwloc when either tiles or numa nodes requested within
 6164|       |    // KMP_HW_SUBSET or granularity setting and no other topology method
 6165|       |    // is requested
 6166|       |    if (__kmp_hw_subset &&
 6167|       |        __kmp_affinity_top_method == affinity_top_method_default)
 6168|       |      if (__kmp_hw_subset->specified(KMP_HW_NUMA) ||
 6169|       |          __kmp_hw_subset->specified(KMP_HW_TILE) ||
 6170|       |          __kmp_affinity.gran == KMP_HW_TILE ||
 6171|       |          __kmp_affinity.gran == KMP_HW_NUMA)
 6172|       |        __kmp_affinity_top_method = affinity_top_method_hwloc;
 6173|       |    // Force using hwloc when tiles or numa nodes requested for OMP_PLACES
 6174|       |    if (__kmp_affinity.gran == KMP_HW_NUMA ||
 6175|       |        __kmp_affinity.gran == KMP_HW_TILE)
 6176|       |      __kmp_affinity_top_method = affinity_top_method_hwloc;
 6177|       |#endif
 6178|       |    // Determine if the machine/OS is actually capable of supporting
 6179|       |    // affinity.
 6180|      1|    const char *var = "KMP_AFFINITY";
 6181|      1|    KMPAffinity::pick_api();
 6182|       |#if KMP_USE_HWLOC
 6183|       |    // If Hwloc topology discovery was requested but affinity was also disabled,
 6184|       |    // then tell user that Hwloc request is being ignored and use default
 6185|       |    // topology discovery method.
 6186|       |    if (__kmp_affinity_top_method == affinity_top_method_hwloc &&
 6187|       |        __kmp_affinity_dispatch->get_api_type() != KMPAffinity::HWLOC) {
 6188|       |      KMP_WARNING(AffIgnoringHwloc, var);
 6189|       |      __kmp_affinity_top_method = affinity_top_method_all;
 6190|       |    }
 6191|       |#endif
 6192|      1|    if (__kmp_affinity.type == affinity_disabled) {
  ------------------
  |  Branch (6192:9): [True: 0, False: 1]
  ------------------
 6193|      0|      KMP_AFFINITY_DISABLE();
  ------------------
  |  |  685|      0|#define KMP_AFFINITY_DISABLE() (__kmp_affin_mask_size = 0)
  ------------------
 6194|      1|    } else if (!KMP_AFFINITY_CAPABLE()) {
  ------------------
  |  |  684|      1|#define KMP_AFFINITY_CAPABLE() (__kmp_affin_mask_size > 0)
  ------------------
  |  Branch (6194:16): [True: 1, False: 0]
  ------------------
 6195|      1|      __kmp_affinity_dispatch->determine_capable(var);
 6196|      1|      if (!KMP_AFFINITY_CAPABLE()) {
  ------------------
  |  |  684|      1|#define KMP_AFFINITY_CAPABLE() (__kmp_affin_mask_size > 0)
  ------------------
  |  Branch (6196:11): [True: 0, False: 1]
  ------------------
 6197|      0|        if (__kmp_affinity.flags.verbose ||
  ------------------
  |  Branch (6197:13): [True: 0, False: 0]
  ------------------
 6198|      0|            (__kmp_affinity.flags.warnings &&
  ------------------
  |  Branch (6198:14): [True: 0, False: 0]
  ------------------
 6199|      0|             (__kmp_affinity.type != affinity_default) &&
  ------------------
  |  Branch (6199:14): [True: 0, False: 0]
  ------------------
 6200|      0|             (__kmp_affinity.type != affinity_none) &&
  ------------------
  |  Branch (6200:14): [True: 0, False: 0]
  ------------------
 6201|      0|             (__kmp_affinity.type != affinity_disabled))) {
  ------------------
  |  Branch (6201:14): [True: 0, False: 0]
  ------------------
 6202|      0|          KMP_WARNING(AffNotSupported, var);
  ------------------
  |  |  145|      0|  __kmp_msg(kmp_ms_warning, KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
 6203|      0|        }
 6204|      0|        __kmp_affinity.type = affinity_disabled;
 6205|      0|        __kmp_affinity.flags.respect = FALSE;
  ------------------
  |  | 1279|      0|#define FALSE 0
  ------------------
 6206|      0|        __kmp_affinity.gran = KMP_HW_THREAD;
 6207|      0|      }
 6208|      1|    }
 6209|       |
 6210|      1|    if (__kmp_affinity.type == affinity_disabled) {
  ------------------
  |  Branch (6210:9): [True: 0, False: 1]
  ------------------
 6211|      0|      __kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
 6212|      1|    } else if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_true) {
  ------------------
  |  Branch (6212:16): [True: 0, False: 1]
  ------------------
 6213|       |      // OMP_PROC_BIND=true maps to OMP_PROC_BIND=spread.
 6214|      0|      __kmp_nested_proc_bind.bind_types[0] = proc_bind_spread;
 6215|      0|    }
 6216|       |
 6217|      1|    if (KMP_AFFINITY_CAPABLE()) {
  ------------------
  |  |  684|      1|#define KMP_AFFINITY_CAPABLE() (__kmp_affin_mask_size > 0)
  |  |  ------------------
  |  |  |  Branch (684:32): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 6218|       |
 6219|       |#if KMP_GROUP_AFFINITY
 6220|       |      // This checks to see if the initial affinity mask is equal
 6221|       |      // to a single windows processor group.  If it is, then we do
 6222|       |      // not respect the initial affinity mask and instead, use the
 6223|       |      // entire machine.
 6224|       |      bool exactly_one_group = false;
 6225|       |      if (__kmp_num_proc_groups > 1) {
 6226|       |        int group;
 6227|       |        bool within_one_group;
 6228|       |        // Get the initial affinity mask and determine if it is
 6229|       |        // contained within a single group.
 6230|       |        kmp_affin_mask_t *init_mask;
 6231|       |        KMP_CPU_ALLOC(init_mask);
 6232|       |        __kmp_get_system_affinity(init_mask, TRUE);
 6233|       |        group = __kmp_get_proc_group(init_mask);
 6234|       |        within_one_group = (group >= 0);
 6235|       |        // If the initial affinity is within a single group,
 6236|       |        // then determine if it is equal to that single group.
 6237|       |        if (within_one_group) {
 6238|       |          DWORD num_bits_in_group = __kmp_GetActiveProcessorCount(group);
 6239|       |          DWORD num_bits_in_mask = 0;
 6240|       |          for (int bit = init_mask->begin(); bit != init_mask->end();
 6241|       |               bit = init_mask->next(bit))
 6242|       |            num_bits_in_mask++;
 6243|       |          exactly_one_group = (num_bits_in_group == num_bits_in_mask);
 6244|       |        }
 6245|       |        KMP_CPU_FREE(init_mask);
 6246|       |      }
 6247|       |
 6248|       |      // Handle the Win 64 group affinity stuff if there are multiple
 6249|       |      // processor groups, or if the user requested it, and OMP 4.0
 6250|       |      // affinity is not in effect.
 6251|       |      if (__kmp_num_proc_groups > 1 &&
 6252|       |          __kmp_affinity.type == affinity_default &&
 6253|       |          __kmp_nested_proc_bind.bind_types[0] == proc_bind_default) {
 6254|       |        // Do not respect the initial processor affinity mask if it is assigned
 6255|       |        // exactly one Windows Processor Group since this is interpreted as the
 6256|       |        // default OS assignment. Not respecting the mask allows the runtime to
 6257|       |        // use all the logical processors in all groups.
 6258|       |        if (__kmp_affinity.flags.respect == affinity_respect_mask_default &&
 6259|       |            exactly_one_group) {
 6260|       |          __kmp_affinity.flags.respect = FALSE;
 6261|       |        }
 6262|       |        // Use compact affinity with anticipation of pinning to at least the
 6263|       |        // group granularity since threads can only be bound to one group.
 6264|       |        if (__kmp_affinity.type == affinity_default) {
 6265|       |          __kmp_affinity.type = affinity_compact;
 6266|       |          __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
 6267|       |        }
 6268|       |        if (__kmp_hh_affinity.type == affinity_default)
 6269|       |          __kmp_hh_affinity.type = affinity_compact;
 6270|       |        if (__kmp_affinity_top_method == affinity_top_method_default)
 6271|       |          __kmp_affinity_top_method = affinity_top_method_all;
 6272|       |        if (__kmp_affinity.gran == KMP_HW_UNKNOWN)
 6273|       |          __kmp_affinity.gran = KMP_HW_PROC_GROUP;
 6274|       |        if (__kmp_hh_affinity.gran == KMP_HW_UNKNOWN)
 6275|       |          __kmp_hh_affinity.gran = KMP_HW_PROC_GROUP;
 6276|       |      } else
 6277|       |
 6278|       |#endif /* KMP_GROUP_AFFINITY */
 6279|       |
 6280|      1|      {
 6281|      1|        if (__kmp_affinity.flags.respect == affinity_respect_mask_default) {
  ------------------
  |  |  860|      1|#define affinity_respect_mask_default (2)
  ------------------
  |  Branch (6281:13): [True: 1, False: 0]
  ------------------
 6282|       |#if KMP_GROUP_AFFINITY
 6283|       |          if (__kmp_num_proc_groups > 1 && exactly_one_group) {
 6284|       |            __kmp_affinity.flags.respect = FALSE;
 6285|       |          } else
 6286|       |#endif /* KMP_GROUP_AFFINITY */
 6287|      1|          {
 6288|      1|            __kmp_affinity.flags.respect = TRUE;
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 6289|      1|          }
 6290|      1|        }
 6291|      1|        if ((__kmp_nested_proc_bind.bind_types[0] != proc_bind_intel) &&
  ------------------
  |  Branch (6291:13): [True: 1, False: 0]
  ------------------
 6292|      1|            (__kmp_nested_proc_bind.bind_types[0] != proc_bind_default)) {
  ------------------
  |  Branch (6292:13): [True: 0, False: 1]
  ------------------
 6293|      0|          if (__kmp_affinity.type == affinity_default) {
  ------------------
  |  Branch (6293:15): [True: 0, False: 0]
  ------------------
 6294|      0|            __kmp_affinity.type = affinity_compact;
 6295|      0|            __kmp_affinity.flags.dups = FALSE;
  ------------------
  |  | 1279|      0|#define FALSE 0
  ------------------
 6296|      0|          }
 6297|      1|        } else if (__kmp_affinity.type == affinity_default) {
  ------------------
  |  Branch (6297:20): [True: 1, False: 0]
  ------------------
 6298|      1|#if KMP_MIC_SUPPORTED
 6299|      1|          if (__kmp_mic_type != non_mic) {
  ------------------
  |  Branch (6299:15): [True: 0, False: 1]
  ------------------
 6300|      0|            __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
 6301|      0|          } else
 6302|      1|#endif
 6303|      1|          {
 6304|      1|            __kmp_nested_proc_bind.bind_types[0] = proc_bind_false;
 6305|      1|          }
 6306|      1|#if KMP_MIC_SUPPORTED
 6307|      1|          if (__kmp_mic_type != non_mic) {
  ------------------
  |  Branch (6307:15): [True: 0, False: 1]
  ------------------
 6308|      0|            __kmp_affinity.type = affinity_scatter;
 6309|      0|          } else
 6310|      1|#endif
 6311|      1|          {
 6312|      1|            __kmp_affinity.type = affinity_none;
 6313|      1|          }
 6314|      1|        }
 6315|      1|        if (__kmp_hh_affinity.type == affinity_default)
  ------------------
  |  Branch (6315:13): [True: 1, False: 0]
  ------------------
 6316|      1|          __kmp_hh_affinity.type = affinity_none;
 6317|      1|        if ((__kmp_affinity.gran == KMP_HW_UNKNOWN) &&
  ------------------
  |  Branch (6317:13): [True: 1, False: 0]
  ------------------
 6318|      1|            (__kmp_affinity.gran_levels < 0)) {
  ------------------
  |  Branch (6318:13): [True: 1, False: 0]
  ------------------
 6319|      1|#if KMP_MIC_SUPPORTED
 6320|      1|          if (__kmp_mic_type != non_mic) {
  ------------------
  |  Branch (6320:15): [True: 0, False: 1]
  ------------------
 6321|      0|            __kmp_affinity.gran = KMP_HW_THREAD;
 6322|      0|          } else
 6323|      1|#endif
 6324|      1|          {
 6325|      1|            __kmp_affinity.gran = KMP_HW_CORE;
 6326|      1|          }
 6327|      1|        }
 6328|      1|        if ((__kmp_hh_affinity.gran == KMP_HW_UNKNOWN) &&
  ------------------
  |  Branch (6328:13): [True: 1, False: 0]
  ------------------
 6329|      1|            (__kmp_hh_affinity.gran_levels < 0)) {
  ------------------
  |  Branch (6329:13): [True: 1, False: 0]
  ------------------
 6330|      1|#if KMP_MIC_SUPPORTED
 6331|      1|          if (__kmp_mic_type != non_mic) {
  ------------------
  |  Branch (6331:15): [True: 0, False: 1]
  ------------------
 6332|      0|            __kmp_hh_affinity.gran = KMP_HW_THREAD;
 6333|      0|          } else
 6334|      1|#endif
 6335|      1|          {
 6336|      1|            __kmp_hh_affinity.gran = KMP_HW_CORE;
 6337|      1|          }
 6338|      1|        }
 6339|      1|        if (__kmp_affinity_top_method == affinity_top_method_default) {
  ------------------
  |  Branch (6339:13): [True: 1, False: 0]
  ------------------
 6340|      1|          __kmp_affinity_top_method = affinity_top_method_all;
 6341|      1|        }
 6342|      1|      }
 6343|      1|    } else {
 6344|       |      // If affinity is disabled, then still need to assign topology method
 6345|       |      // to attempt machine detection and affinity types
 6346|      0|      if (__kmp_affinity_top_method == affinity_top_method_default)
  ------------------
  |  Branch (6346:11): [True: 0, False: 0]
  ------------------
 6347|      0|        __kmp_affinity_top_method = affinity_top_method_all;
 6348|      0|      if (__kmp_affinity.type == affinity_default)
  ------------------
  |  Branch (6348:11): [True: 0, False: 0]
  ------------------
 6349|      0|        __kmp_affinity.type = affinity_disabled;
 6350|      0|      if (__kmp_hh_affinity.type == affinity_default)
  ------------------
  |  Branch (6350:11): [True: 0, False: 0]
  ------------------
 6351|      0|        __kmp_hh_affinity.type = affinity_disabled;
 6352|      0|    }
 6353|       |
 6354|       |#ifdef KMP_DEBUG
 6355|       |    for (const kmp_affinity_t *affinity : __kmp_affinities)
 6356|       |      __kmp_print_affinity_settings(affinity);
 6357|       |    KMP_DEBUG_ASSERT(__kmp_nested_proc_bind.bind_types[0] != proc_bind_default);
 6358|       |    K_DIAG(1, ("__kmp_nested_proc_bind.bind_types[0] == %d\n",
 6359|       |               __kmp_nested_proc_bind.bind_types[0]));
 6360|       |#endif
 6361|      1|  }
 6362|       |
 6363|      1|#endif /* KMP_AFFINITY_SUPPORTED */
 6364|       |
 6365|       |  // Post-initialization step: some env. vars need their value's further
 6366|       |  // processing
 6367|      1|  if (string != NULL) { // kmp_set_defaults() was called
  ------------------
  |  Branch (6367:7): [True: 0, False: 1]
  ------------------
 6368|      0|    __kmp_aux_env_initialize(&block);
 6369|      0|  }
 6370|       |
 6371|      1|  __kmp_env_blk_free(&block);
 6372|       |
 6373|      1|  KMP_MB();
 6374|       |
 6375|      1|} // __kmp_env_initialize
_Z14__kmp_env_dumpv:
 6464|      1|void __kmp_env_dump() {
 6465|       |
 6466|      1|  kmp_env_blk_t block;
 6467|      1|  kmp_str_buf_t buffer, env, notdefined;
 6468|       |
 6469|      1|  __kmp_stg_init();
 6470|      1|  __kmp_str_buf_init(&buffer);
  ------------------
  |  |   41|      1|  {                                                                            \
  |  |   42|      1|    (b)->str = (b)->bulk;                                                      \
  |  |   43|      1|    (b)->size = sizeof((b)->bulk);                                             \
  |  |   44|      1|    (b)->used = 0;                                                             \
  |  |   45|      1|    (b)->bulk[0] = 0;                                                          \
  |  |   46|      1|  }
  ------------------
 6471|      1|  __kmp_str_buf_init(&env);
  ------------------
  |  |   41|      1|  {                                                                            \
  |  |   42|      1|    (b)->str = (b)->bulk;                                                      \
  |  |   43|      1|    (b)->size = sizeof((b)->bulk);                                             \
  |  |   44|      1|    (b)->used = 0;                                                             \
  |  |   45|      1|    (b)->bulk[0] = 0;                                                          \
  |  |   46|      1|  }
  ------------------
 6472|      1|  __kmp_str_buf_init(&notdefined);
  ------------------
  |  |   41|      1|  {                                                                            \
  |  |   42|      1|    (b)->str = (b)->bulk;                                                      \
  |  |   43|      1|    (b)->size = sizeof((b)->bulk);                                             \
  |  |   44|      1|    (b)->used = 0;                                                             \
  |  |   45|      1|    (b)->bulk[0] = 0;                                                          \
  |  |   46|      1|  }
  ------------------
 6473|       |
 6474|      1|  __kmp_env_blk_init(&block, NULL);
 6475|      1|  __kmp_env_blk_sort(&block);
 6476|       |
 6477|      1|  __kmp_str_buf_print(&notdefined, ": %s", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 6478|       |
 6479|     88|  for (int i = 0; i < __kmp_stg_count; ++i) {
  ------------------
  |  Branch (6479:19): [True: 87, False: 1]
  ------------------
 6480|     87|    if (__kmp_stg_table[i].print == NULL)
  ------------------
  |  Branch (6480:9): [True: 4, False: 83]
  ------------------
 6481|      4|      continue;
 6482|     83|    __kmp_str_buf_clear(&env);
 6483|     83|    __kmp_stg_table[i].print(&env, __kmp_stg_table[i].name,
 6484|     83|                             __kmp_stg_table[i].data);
 6485|     83|    if (env.used < 4) // valid definition must have indents (3) and a new line
  ------------------
  |  Branch (6485:9): [True: 8, False: 75]
  ------------------
 6486|      8|      continue;
 6487|     75|    if (strstr(env.str, notdefined.str))
  ------------------
  |  Branch (6487:9): [True: 7, False: 68]
  ------------------
 6488|       |      // normalize the string
 6489|      7|      __kmp_str_buf_print(&buffer, "%s=undefined\n", __kmp_stg_table[i].name);
 6490|     68|    else
 6491|     68|      __kmp_str_buf_cat(&buffer, env.str + 3, env.used - 3);
 6492|     75|  }
 6493|       |
 6494|      1|  ompd_env_block = (char *)__kmp_allocate(buffer.used + 1);
  ------------------
  |  | 3617|      1|#define __kmp_allocate(size) ___kmp_allocate((size)KMP_SRC_LOC_CURR)
  ------------------
 6495|      1|  KMP_MEMCPY(ompd_env_block, buffer.str, buffer.used + 1);
  ------------------
  |  |   69|      1|#define KMP_MEMCPY memcpy
  ------------------
 6496|      1|  ompd_env_block_size = (ompd_size_t)KMP_STRLEN(ompd_env_block);
  ------------------
  |  |   68|      1|#define KMP_STRLEN strlen
  ------------------
 6497|       |
 6498|      1|  __kmp_env_blk_free(&block);
 6499|      1|  __kmp_str_buf_free(&buffer);
 6500|      1|  __kmp_str_buf_free(&env);
 6501|      1|  __kmp_str_buf_free(&notdefined);
 6502|      1|}
kmp_settings.cpp:_ZL14__kmp_stg_initv:
 5695|      2|static void __kmp_stg_init(void) {
 5696|       |
 5697|      2|  static int initialized = 0;
 5698|       |
 5699|      2|  if (!initialized) {
  ------------------
  |  Branch (5699:7): [True: 1, False: 1]
  ------------------
 5700|       |
 5701|       |    // Sort table.
 5702|      1|    qsort(__kmp_stg_table, __kmp_stg_count - 1, sizeof(kmp_setting_t),
 5703|      1|          __kmp_stg_cmp);
 5704|       |
 5705|      1|    { // Initialize *_STACKSIZE data.
 5706|      1|      kmp_setting_t *kmp_stacksize =
 5707|      1|          __kmp_stg_find("KMP_STACKSIZE"); // 1st priority.
 5708|      1|#ifdef KMP_GOMP_COMPAT
 5709|      1|      kmp_setting_t *gomp_stacksize =
 5710|      1|          __kmp_stg_find("GOMP_STACKSIZE"); // 2nd priority.
 5711|      1|#endif
 5712|      1|      kmp_setting_t *omp_stacksize =
 5713|      1|          __kmp_stg_find("OMP_STACKSIZE"); // 3rd priority.
 5714|       |
 5715|       |      // !!! volatile keyword is Intel(R) C Compiler bug CQ49908 workaround.
 5716|       |      // !!! Compiler does not understand rivals is used and optimizes out
 5717|       |      // assignments
 5718|       |      // !!!     rivals[ i ++ ] = ...;
 5719|      1|      static kmp_setting_t *volatile rivals[4];
 5720|      1|      static kmp_stg_ss_data_t kmp_data = {1, CCAST(kmp_setting_t **, rivals)};
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5721|      1|#ifdef KMP_GOMP_COMPAT
 5722|      1|      static kmp_stg_ss_data_t gomp_data = {1024,
 5723|      1|                                            CCAST(kmp_setting_t **, rivals)};
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5724|      1|#endif
 5725|      1|      static kmp_stg_ss_data_t omp_data = {1024,
 5726|      1|                                           CCAST(kmp_setting_t **, rivals)};
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5727|      1|      int i = 0;
 5728|       |
 5729|      1|      rivals[i++] = kmp_stacksize;
 5730|      1|#ifdef KMP_GOMP_COMPAT
 5731|      1|      if (gomp_stacksize != NULL) {
  ------------------
  |  Branch (5731:11): [True: 1, False: 0]
  ------------------
 5732|      1|        rivals[i++] = gomp_stacksize;
 5733|      1|      }
 5734|      1|#endif
 5735|      1|      rivals[i++] = omp_stacksize;
 5736|      1|      rivals[i++] = NULL;
 5737|       |
 5738|      1|      kmp_stacksize->data = &kmp_data;
 5739|      1|#ifdef KMP_GOMP_COMPAT
 5740|      1|      if (gomp_stacksize != NULL) {
  ------------------
  |  Branch (5740:11): [True: 1, False: 0]
  ------------------
 5741|      1|        gomp_stacksize->data = &gomp_data;
 5742|      1|      }
 5743|      1|#endif
 5744|      1|      omp_stacksize->data = &omp_data;
 5745|      1|    }
 5746|       |
 5747|      1|    { // Initialize KMP_LIBRARY and OMP_WAIT_POLICY data.
 5748|      1|      kmp_setting_t *kmp_library =
 5749|      1|          __kmp_stg_find("KMP_LIBRARY"); // 1st priority.
 5750|      1|      kmp_setting_t *omp_wait_policy =
 5751|      1|          __kmp_stg_find("OMP_WAIT_POLICY"); // 2nd priority.
 5752|       |
 5753|       |      // !!! volatile keyword is Intel(R) C Compiler bug CQ49908 workaround.
 5754|      1|      static kmp_setting_t *volatile rivals[3];
 5755|      1|      static kmp_stg_wp_data_t kmp_data = {0, CCAST(kmp_setting_t **, rivals)};
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5756|      1|      static kmp_stg_wp_data_t omp_data = {1, CCAST(kmp_setting_t **, rivals)};
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5757|      1|      int i = 0;
 5758|       |
 5759|      1|      rivals[i++] = kmp_library;
 5760|      1|      if (omp_wait_policy != NULL) {
  ------------------
  |  Branch (5760:11): [True: 1, False: 0]
  ------------------
 5761|      1|        rivals[i++] = omp_wait_policy;
 5762|      1|      }
 5763|      1|      rivals[i++] = NULL;
 5764|       |
 5765|      1|      kmp_library->data = &kmp_data;
 5766|      1|      if (omp_wait_policy != NULL) {
  ------------------
  |  Branch (5766:11): [True: 1, False: 0]
  ------------------
 5767|      1|        omp_wait_policy->data = &omp_data;
 5768|      1|      }
 5769|      1|    }
 5770|       |
 5771|      1|    { // Initialize KMP_DEVICE_THREAD_LIMIT and KMP_ALL_THREADS
 5772|      1|      kmp_setting_t *kmp_device_thread_limit =
 5773|      1|          __kmp_stg_find("KMP_DEVICE_THREAD_LIMIT"); // 1st priority.
 5774|      1|      kmp_setting_t *kmp_all_threads =
 5775|      1|          __kmp_stg_find("KMP_ALL_THREADS"); // 2nd priority.
 5776|       |
 5777|       |      // !!! volatile keyword is Intel(R) C Compiler bug CQ49908 workaround.
 5778|      1|      static kmp_setting_t *volatile rivals[3];
 5779|      1|      int i = 0;
 5780|       |
 5781|      1|      rivals[i++] = kmp_device_thread_limit;
 5782|      1|      rivals[i++] = kmp_all_threads;
 5783|      1|      rivals[i++] = NULL;
 5784|       |
 5785|      1|      kmp_device_thread_limit->data = CCAST(kmp_setting_t **, rivals);
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5786|      1|      kmp_all_threads->data = CCAST(kmp_setting_t **, rivals);
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5787|      1|    }
 5788|       |
 5789|      1|    { // Initialize KMP_HW_SUBSET and KMP_PLACE_THREADS
 5790|       |      // 1st priority
 5791|      1|      kmp_setting_t *kmp_hw_subset = __kmp_stg_find("KMP_HW_SUBSET");
 5792|       |      // 2nd priority
 5793|      1|      kmp_setting_t *kmp_place_threads = __kmp_stg_find("KMP_PLACE_THREADS");
 5794|       |
 5795|       |      // !!! volatile keyword is Intel(R) C Compiler bug CQ49908 workaround.
 5796|      1|      static kmp_setting_t *volatile rivals[3];
 5797|      1|      int i = 0;
 5798|       |
 5799|      1|      rivals[i++] = kmp_hw_subset;
 5800|      1|      rivals[i++] = kmp_place_threads;
 5801|      1|      rivals[i++] = NULL;
 5802|       |
 5803|      1|      kmp_hw_subset->data = CCAST(kmp_setting_t **, rivals);
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5804|      1|      kmp_place_threads->data = CCAST(kmp_setting_t **, rivals);
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5805|      1|    }
 5806|       |
 5807|      1|#if KMP_AFFINITY_SUPPORTED
 5808|      1|    { // Initialize KMP_AFFINITY, GOMP_CPU_AFFINITY, and OMP_PROC_BIND data.
 5809|      1|      kmp_setting_t *kmp_affinity =
 5810|      1|          __kmp_stg_find("KMP_AFFINITY"); // 1st priority.
 5811|      1|      KMP_DEBUG_ASSERT(kmp_affinity != NULL);
 5812|       |
 5813|      1|#ifdef KMP_GOMP_COMPAT
 5814|      1|      kmp_setting_t *gomp_cpu_affinity =
 5815|      1|          __kmp_stg_find("GOMP_CPU_AFFINITY"); // 2nd priority.
 5816|      1|      KMP_DEBUG_ASSERT(gomp_cpu_affinity != NULL);
 5817|      1|#endif
 5818|       |
 5819|      1|      kmp_setting_t *omp_proc_bind =
 5820|      1|          __kmp_stg_find("OMP_PROC_BIND"); // 3rd priority.
 5821|      1|      KMP_DEBUG_ASSERT(omp_proc_bind != NULL);
 5822|       |
 5823|       |      // !!! volatile keyword is Intel(R) C Compiler bug CQ49908 workaround.
 5824|      1|      static kmp_setting_t *volatile rivals[4];
 5825|      1|      int i = 0;
 5826|       |
 5827|      1|      rivals[i++] = kmp_affinity;
 5828|       |
 5829|      1|#ifdef KMP_GOMP_COMPAT
 5830|      1|      rivals[i++] = gomp_cpu_affinity;
 5831|      1|      gomp_cpu_affinity->data = CCAST(kmp_setting_t **, rivals);
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5832|      1|#endif
 5833|       |
 5834|      1|      rivals[i++] = omp_proc_bind;
 5835|      1|      omp_proc_bind->data = CCAST(kmp_setting_t **, rivals);
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5836|      1|      rivals[i++] = NULL;
 5837|       |
 5838|      1|      static kmp_setting_t *volatile places_rivals[4];
 5839|      1|      i = 0;
 5840|       |
 5841|      1|      kmp_setting_t *omp_places = __kmp_stg_find("OMP_PLACES"); // 3rd priority.
 5842|      1|      KMP_DEBUG_ASSERT(omp_places != NULL);
 5843|       |
 5844|      1|      places_rivals[i++] = kmp_affinity;
 5845|      1|#ifdef KMP_GOMP_COMPAT
 5846|      1|      places_rivals[i++] = gomp_cpu_affinity;
 5847|      1|#endif
 5848|      1|      places_rivals[i++] = omp_places;
 5849|      1|      omp_places->data = CCAST(kmp_setting_t **, places_rivals);
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5850|      1|      places_rivals[i++] = NULL;
 5851|      1|    }
 5852|       |#else
 5853|       |// KMP_AFFINITY not supported, so OMP_PROC_BIND has no rivals.
 5854|       |// OMP_PLACES not supported yet.
 5855|       |#endif // KMP_AFFINITY_SUPPORTED
 5856|       |
 5857|      1|    { // Initialize KMP_DETERMINISTIC_REDUCTION and KMP_FORCE_REDUCTION data.
 5858|      1|      kmp_setting_t *kmp_force_red =
 5859|      1|          __kmp_stg_find("KMP_FORCE_REDUCTION"); // 1st priority.
 5860|      1|      kmp_setting_t *kmp_determ_red =
 5861|      1|          __kmp_stg_find("KMP_DETERMINISTIC_REDUCTION"); // 2nd priority.
 5862|       |
 5863|       |      // !!! volatile keyword is Intel(R) C Compiler bug CQ49908 workaround.
 5864|      1|      static kmp_setting_t *volatile rivals[3];
 5865|      1|      static kmp_stg_fr_data_t force_data = {1,
 5866|      1|                                             CCAST(kmp_setting_t **, rivals)};
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5867|      1|      static kmp_stg_fr_data_t determ_data = {0,
 5868|      1|                                              CCAST(kmp_setting_t **, rivals)};
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
 5869|      1|      int i = 0;
 5870|       |
 5871|      1|      rivals[i++] = kmp_force_red;
 5872|      1|      if (kmp_determ_red != NULL) {
  ------------------
  |  Branch (5872:11): [True: 1, False: 0]
  ------------------
 5873|      1|        rivals[i++] = kmp_determ_red;
 5874|      1|      }
 5875|      1|      rivals[i++] = NULL;
 5876|       |
 5877|      1|      kmp_force_red->data = &force_data;
 5878|      1|      if (kmp_determ_red != NULL) {
  ------------------
  |  Branch (5878:11): [True: 1, False: 0]
  ------------------
 5879|      1|        kmp_determ_red->data = &determ_data;
 5880|      1|      }
 5881|      1|    }
 5882|       |
 5883|      1|    initialized = 1;
 5884|      1|  }
 5885|       |
 5886|       |  // Reset flags.
 5887|      2|  int i;
 5888|    176|  for (i = 0; i < __kmp_stg_count; ++i) {
  ------------------
  |  Branch (5888:15): [True: 174, False: 2]
  ------------------
 5889|    174|    __kmp_stg_table[i].set = 0;
 5890|    174|  }
 5891|       |
 5892|      2|} // __kmp_stg_init
kmp_settings.cpp:_ZL13__kmp_stg_cmpPKvS0_:
 5678|    431|static int __kmp_stg_cmp(void const *_a, void const *_b) {
 5679|    431|  const kmp_setting_t *a = RCAST(const kmp_setting_t *, _a);
  ------------------
  |  |  230|    431|#define RCAST(type, var) reinterpret_cast<type>(var)
  ------------------
 5680|    431|  const kmp_setting_t *b = RCAST(const kmp_setting_t *, _b);
  ------------------
  |  |  230|    431|#define RCAST(type, var) reinterpret_cast<type>(var)
  ------------------
 5681|       |
 5682|       |  // Process KMP_AFFINITY last.
 5683|       |  // It needs to come after OMP_PLACES and GOMP_CPU_AFFINITY.
 5684|    431|  if (strcmp(a->name, "KMP_AFFINITY") == 0) {
  ------------------
  |  Branch (5684:7): [True: 7, False: 424]
  ------------------
 5685|      7|    if (strcmp(b->name, "KMP_AFFINITY") == 0) {
  ------------------
  |  Branch (5685:9): [True: 0, False: 7]
  ------------------
 5686|      0|      return 0;
 5687|      0|    }
 5688|      7|    return 1;
 5689|    424|  } else if (strcmp(b->name, "KMP_AFFINITY") == 0) {
  ------------------
  |  Branch (5689:14): [True: 1, False: 423]
  ------------------
 5690|      1|    return -1;
 5691|      1|  }
 5692|    423|  return strcmp(a->name, b->name);
 5693|    431|} // __kmp_stg_cmp
kmp_settings.cpp:_ZL14__kmp_stg_findPKc:
 5664|     83|static inline kmp_setting_t *__kmp_stg_find(char const *name) {
 5665|       |
 5666|     83|  int i;
 5667|     83|  if (name != NULL) {
  ------------------
  |  Branch (5667:7): [True: 83, False: 0]
  ------------------
 5668|  6.58k|    for (i = 0; i < __kmp_stg_count; ++i) {
  ------------------
  |  Branch (5668:17): [True: 6.51k, False: 68]
  ------------------
 5669|  6.51k|      if (strcmp(__kmp_stg_table[i].name, name) == 0) {
  ------------------
  |  Branch (5669:11): [True: 15, False: 6.50k]
  ------------------
 5670|     15|        return &__kmp_stg_table[i];
 5671|     15|      }
 5672|  6.51k|    }
 5673|     83|  }
 5674|     68|  return NULL;
 5675|       |
 5676|     83|} // __kmp_stg_find
kmp_settings.cpp:_ZL15__kmp_stg_parsePKcS0_:
 5894|     35|static void __kmp_stg_parse(char const *name, char const *value) {
 5895|       |  // On Windows* OS there are some nameless variables like "C:=C:\" (yeah,
 5896|       |  // really nameless, they are presented in environment block as
 5897|       |  // "=C:=C\\\x00=D:=D:\\\x00...", so let us skip them.
 5898|     35|  if (name[0] == 0) {
  ------------------
  |  Branch (5898:7): [True: 0, False: 35]
  ------------------
 5899|      0|    return;
 5900|      0|  }
 5901|       |
 5902|     35|  if (value != NULL) {
  ------------------
  |  Branch (5902:7): [True: 34, False: 1]
  ------------------
 5903|     34|    kmp_setting_t *setting = __kmp_stg_find(name);
 5904|     34|    if (setting != NULL) {
  ------------------
  |  Branch (5904:9): [True: 0, False: 34]
  ------------------
 5905|      0|      setting->parse(name, value, setting->data);
 5906|      0|      setting->defined = 1;
 5907|      0|    }
 5908|     34|  }
 5909|       |
 5910|     35|} // __kmp_stg_parse
kmp_settings.cpp:_ZL25__kmp_stg_print_blocktimeP11kmp_str_bufPKcPv:
  770|      1|                                      void *data) {
  771|      1|  __kmp_stg_print_int(buffer, name, __kmp_dflt_blocktime);
  772|      1|} // __kmp_stg_print_blocktime
kmp_settings.cpp:_ZL19__kmp_stg_print_intP11kmp_str_bufPKci:
  590|     24|                                int value) {
  591|     24|  if (__kmp_env_format) {
  ------------------
  |  Branch (591:7): [True: 0, False: 24]
  ------------------
  592|      0|    KMP_STR_BUF_PRINT_INT;
  ------------------
  |  |   60|      0|  __kmp_str_buf_print(buffer, "  %s %s='%d'\n", KMP_I18N_STR(Host), name, value)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
  593|     24|  } else {
  594|     24|    __kmp_str_buf_print(buffer, "   %s=%d\n", name, value);
  595|     24|  }
  596|     24|} // __kmp_stg_print_int
kmp_settings.cpp:_ZL25__kmp_stg_print_use_yieldP11kmp_str_bufPKcPv:
  725|      1|                                      void *data) {
  726|      1|  __kmp_stg_print_int(buffer, name, __kmp_use_yield);
  727|      1|} // __kmp_stg_print_use_yield
kmp_settings.cpp:_ZL32__kmp_stg_print_duplicate_lib_okP11kmp_str_bufPKcPv:
  785|      1|                                             char const *name, void *data) {
  786|      1|  __kmp_stg_print_bool(buffer, name, __kmp_duplicate_library_ok);
  787|      1|} // __kmp_stg_print_duplicate_lib_ok
kmp_settings.cpp:_ZL20__kmp_stg_print_boolP11kmp_str_bufPKci:
  581|     17|                                 int value) {
  582|     17|  if (__kmp_env_format) {
  ------------------
  |  Branch (582:7): [True: 0, False: 17]
  ------------------
  583|      0|    KMP_STR_BUF_PRINT_BOOL;
  ------------------
  |  |   58|      0|  KMP_STR_BUF_PRINT_BOOL_EX(name, value, "TRUE", "FALSE")
  |  |  ------------------
  |  |  |  |   55|      0|  __kmp_str_buf_print(buffer, "  %s %s='%s'\n", KMP_I18N_STR(Host), n,         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  |  |  ------------------
  |  |  |  |   56|      0|                      (v) ? t : f)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (56:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  584|     17|  } else {
  585|     17|    __kmp_str_buf_print(buffer, "   %s=%s\n", name, value ? "true" : "false");
  ------------------
  |  Branch (585:53): [True: 5, False: 12]
  ------------------
  586|     17|  }
  587|     17|} // __kmp_stg_print_bool
kmp_settings.cpp:_ZL27__kmp_stg_print_wait_policyP11kmp_str_bufPKcPv:
  868|      2|                                        void *data) {
  869|       |
  870|      2|  kmp_stg_wp_data_t *wait = (kmp_stg_wp_data_t *)data;
  871|      2|  char const *value = NULL;
  872|       |
  873|      2|  if (wait->omp) {
  ------------------
  |  Branch (873:7): [True: 1, False: 1]
  ------------------
  874|      1|    switch (__kmp_library) {
  ------------------
  |  Branch (874:13): [True: 0, False: 1]
  ------------------
  875|      0|    case library_turnaround: {
  ------------------
  |  Branch (875:5): [True: 0, False: 1]
  ------------------
  876|      0|      value = "ACTIVE";
  877|      0|    } break;
  878|      0|    case library_throughput: {
  ------------------
  |  Branch (878:5): [True: 0, False: 1]
  ------------------
  879|      0|      value = "PASSIVE";
  880|      0|    } break;
  881|      1|    }
  882|      1|  } else {
  883|      1|    switch (__kmp_library) {
  ------------------
  |  Branch (883:13): [True: 0, False: 1]
  ------------------
  884|      0|    case library_serial: {
  ------------------
  |  Branch (884:5): [True: 0, False: 1]
  ------------------
  885|      0|      value = "serial";
  886|      0|    } break;
  887|      0|    case library_turnaround: {
  ------------------
  |  Branch (887:5): [True: 0, False: 1]
  ------------------
  888|      0|      value = "turnaround";
  889|      0|    } break;
  890|      0|    case library_throughput: {
  ------------------
  |  Branch (890:5): [True: 0, False: 1]
  ------------------
  891|      0|      value = "throughput";
  892|      0|    } break;
  893|      1|    }
  894|      1|  }
  895|      2|  if (value != NULL) {
  ------------------
  |  Branch (895:7): [True: 0, False: 2]
  ------------------
  896|      0|    __kmp_stg_print_str(buffer, name, value);
  897|      0|  }
  898|       |
  899|      2|} // __kmp_stg_print_wait_policy
kmp_settings.cpp:_ZL19__kmp_stg_print_strP11kmp_str_bufPKcS2_:
  608|      4|                                char const *value) {
  609|      4|  if (__kmp_env_format) {
  ------------------
  |  Branch (609:7): [True: 0, False: 4]
  ------------------
  610|      0|    KMP_STR_BUF_PRINT_STR;
  ------------------
  |  |   65|      0|  __kmp_str_buf_print(buffer, "  %s %s='%s'\n", KMP_I18N_STR(Host), name, value)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
  611|      4|  } else {
  612|      4|    __kmp_str_buf_print(buffer, "   %s=%s\n", name, value);
  613|      4|  }
  614|      4|} // __kmp_stg_print_str
kmp_settings.cpp:_ZL35__kmp_stg_print_device_thread_limitP11kmp_str_bufPKcPv:
  659|      1|                                                char const *name, void *data) {
  660|      1|  __kmp_stg_print_int(buffer, name, __kmp_max_nth);
  661|      1|} // __kmp_stg_print_device_thread_limit
kmp_settings.cpp:_ZL24__kmp_stg_print_settingsP11kmp_str_bufPKcPv:
  941|      1|                                     void *data) {
  942|      1|  __kmp_stg_print_bool(buffer, name, __kmp_settings);
  943|      1|} // __kmp_stg_print_settings
kmp_settings.cpp:_ZL27__kmp_stg_print_stackoffsetP11kmp_str_bufPKcPv:
  978|      1|                                        void *data) {
  979|      1|  __kmp_stg_print_size(buffer, name, __kmp_stkoffset);
  980|      1|} // __kmp_stg_print_stackoffset
kmp_settings.cpp:_ZL20__kmp_stg_print_sizeP11kmp_str_bufPKcm:
  617|      3|                                 size_t value) {
  618|      3|  if (__kmp_env_format) {
  ------------------
  |  Branch (618:7): [True: 0, False: 3]
  ------------------
  619|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
  620|      0|    __kmp_str_buf_print_size(buffer, value);
  621|      0|    __kmp_str_buf_print(buffer, "'\n");
  622|      3|  } else {
  623|      3|    __kmp_str_buf_print(buffer, "   %s=", name);
  624|      3|    __kmp_str_buf_print_size(buffer, value);
  625|      3|    __kmp_str_buf_print(buffer, "\n");
  626|      3|    return;
  627|      3|  }
  628|      3|} // __kmp_stg_print_size
kmp_settings.cpp:_ZL25__kmp_stg_print_stacksizeP11kmp_str_bufPKcPv:
 1010|      2|                                      void *data) {
 1011|      2|  kmp_stg_ss_data_t *stacksize = (kmp_stg_ss_data_t *)data;
 1012|      2|  if (__kmp_env_format) {
  ------------------
  |  Branch (1012:7): [True: 0, False: 2]
  ------------------
 1013|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1014|      0|    __kmp_str_buf_print_size(buffer, (__kmp_stksize % 1024)
  ------------------
  |  Branch (1014:38): [True: 0, False: 0]
  ------------------
 1015|      0|                                         ? __kmp_stksize / stacksize->factor
 1016|      0|                                         : __kmp_stksize);
 1017|      0|    __kmp_str_buf_print(buffer, "'\n");
 1018|      2|  } else {
 1019|      2|    __kmp_str_buf_print(buffer, "   %s=", name);
 1020|      2|    __kmp_str_buf_print_size(buffer, (__kmp_stksize % 1024)
  ------------------
  |  Branch (1020:38): [True: 0, False: 2]
  ------------------
 1021|      2|                                         ? __kmp_stksize / stacksize->factor
 1022|      2|                                         : __kmp_stksize);
 1023|      2|    __kmp_str_buf_print(buffer, "\n");
 1024|      2|  }
 1025|      2|} // __kmp_stg_print_stacksize
kmp_settings.cpp:_ZL24__kmp_stg_print_stackpadP11kmp_str_bufPKcPv:
  959|      1|                                     void *data) {
  960|      1|  __kmp_stg_print_int(buffer, name, __kmp_stkpadding);
  961|      1|} // __kmp_stg_print_stackpad
kmp_settings.cpp:_ZL23__kmp_stg_print_versionP11kmp_str_bufPKcPv:
 1036|      1|                                    void *data) {
 1037|      1|  __kmp_stg_print_bool(buffer, name, __kmp_version);
 1038|      1|} // __kmp_stg_print_version
kmp_settings.cpp:_ZL24__kmp_stg_print_warningsP11kmp_str_bufPKcPv:
 1054|      1|                                     void *data) {
 1055|       |  // AC: TODO: change to print_int? (needs documentation change)
 1056|      1|  __kmp_stg_print_bool(buffer, name, __kmp_generate_warnings);
 1057|      1|} // __kmp_stg_print_warnings
kmp_settings.cpp:_ZL28__kmp_stg_print_nesting_modeP11kmp_str_bufPKcPv:
 1072|      1|                                         char const *name, void *data) {
 1073|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (1073:7): [True: 0, False: 1]
  ------------------
 1074|      0|    KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1075|      1|  } else {
 1076|      1|    __kmp_str_buf_print(buffer, "   %s", name);
 1077|      1|  }
 1078|      1|  __kmp_str_buf_print(buffer, "=%d\n", __kmp_nesting_mode);
 1079|      1|} // __kmp_stg_print_nesting_mode
kmp_settings.cpp:_ZL22__kmp_stg_print_nestedP11kmp_str_bufPKcPv:
 1099|      1|                                   void *data) {
 1100|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (1100:7): [True: 0, False: 1]
  ------------------
 1101|      0|    KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1102|      1|  } else {
 1103|      1|    __kmp_str_buf_print(buffer, "   %s", name);
 1104|      1|  }
 1105|      1|  __kmp_str_buf_print(buffer, ": deprecated; max-active-levels-var=%d\n",
 1106|      1|                      __kmp_dflt_max_active_levels);
 1107|      1|} // __kmp_stg_print_nested
kmp_settings.cpp:_ZL27__kmp_stg_print_num_threadsP11kmp_str_bufPKcPv:
 1328|      1|                                        void *data) {
 1329|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (1329:7): [True: 0, False: 1]
  ------------------
 1330|      0|    KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1331|      1|  } else {
 1332|      1|    __kmp_str_buf_print(buffer, "   %s", name);
 1333|      1|  }
 1334|      1|  if (__kmp_nested_nth.used) {
  ------------------
  |  Branch (1334:7): [True: 0, False: 1]
  ------------------
 1335|      0|    kmp_str_buf_t buf;
 1336|      0|    __kmp_str_buf_init(&buf);
  ------------------
  |  |   41|      0|  {                                                                            \
  |  |   42|      0|    (b)->str = (b)->bulk;                                                      \
  |  |   43|      0|    (b)->size = sizeof((b)->bulk);                                             \
  |  |   44|      0|    (b)->used = 0;                                                             \
  |  |   45|      0|    (b)->bulk[0] = 0;                                                          \
  |  |   46|      0|  }
  ------------------
 1337|      0|    for (int i = 0; i < __kmp_nested_nth.used; i++) {
  ------------------
  |  Branch (1337:21): [True: 0, False: 0]
  ------------------
 1338|      0|      __kmp_str_buf_print(&buf, "%d", __kmp_nested_nth.nth[i]);
 1339|      0|      if (i < __kmp_nested_nth.used - 1) {
  ------------------
  |  Branch (1339:11): [True: 0, False: 0]
  ------------------
 1340|      0|        __kmp_str_buf_print(&buf, ",");
 1341|      0|      }
 1342|      0|    }
 1343|      0|    __kmp_str_buf_print(buffer, "='%s'\n", buf.str);
 1344|      0|    __kmp_str_buf_free(&buf);
 1345|      1|  } else {
 1346|      1|    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 1347|      1|  }
 1348|      1|} // __kmp_stg_print_num_threads
kmp_settings.cpp:_ZL23__kmp_stg_print_taskingP11kmp_str_bufPKcPv:
 1360|      1|                                    void *data) {
 1361|      1|  __kmp_stg_print_int(buffer, name, __kmp_tasking_mode);
 1362|      1|} // __kmp_stg_print_tasking
kmp_settings.cpp:_ZL29__kmp_stg_print_task_stealingP11kmp_str_bufPKcPv:
 1371|      1|                                          char const *name, void *data) {
 1372|      1|  __kmp_stg_print_int(buffer, name, __kmp_task_stealing_constraint);
 1373|      1|} // __kmp_stg_print_task_stealing
kmp_settings.cpp:_ZL33__kmp_stg_print_max_active_levelsP11kmp_str_bufPKcPv:
 1396|      1|                                              char const *name, void *data) {
 1397|      1|  __kmp_stg_print_int(buffer, name, __kmp_dflt_max_active_levels);
 1398|      1|} // __kmp_stg_print_max_active_levels
kmp_settings.cpp:_ZL30__kmp_stg_print_default_deviceP11kmp_str_bufPKcPv:
 1409|      1|                                           char const *name, void *data) {
 1410|      1|  __kmp_stg_print_int(buffer, name, __kmp_default_device);
 1411|      1|} // __kmp_stg_print_default_device
kmp_settings.cpp:_ZL30__kmp_stg_print_target_offloadP11kmp_str_bufPKcPv:
 1436|      1|                                           char const *name, void *data) {
 1437|      1|  const char *value = NULL;
 1438|      1|  if (__kmp_target_offload == tgt_default)
  ------------------
  |  Branch (1438:7): [True: 1, False: 0]
  ------------------
 1439|      1|    value = "DEFAULT";
 1440|      0|  else if (__kmp_target_offload == tgt_mandatory)
  ------------------
  |  Branch (1440:12): [True: 0, False: 0]
  ------------------
 1441|      0|    value = "MANDATORY";
 1442|      0|  else if (__kmp_target_offload == tgt_disabled)
  ------------------
  |  Branch (1442:12): [True: 0, False: 0]
  ------------------
 1443|      0|    value = "DISABLED";
 1444|      1|  KMP_DEBUG_ASSERT(value);
 1445|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (1445:7): [True: 0, False: 1]
  ------------------
 1446|      0|    KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1447|      1|  } else {
 1448|      1|    __kmp_str_buf_print(buffer, "   %s", name);
 1449|      1|  }
 1450|      1|  __kmp_str_buf_print(buffer, "=%s\n", value);
 1451|      1|} // __kmp_stg_print_target_offload
kmp_settings.cpp:_ZL33__kmp_stg_print_max_task_priorityP11kmp_str_bufPKcPv:
 1462|      1|                                              char const *name, void *data) {
 1463|      1|  __kmp_stg_print_int(buffer, name, __kmp_max_task_priority);
 1464|      1|} // __kmp_stg_print_max_task_priority
kmp_settings.cpp:_ZL34__kmp_stg_print_taskloop_min_tasksP11kmp_str_bufPKcPv:
 1476|      1|                                               char const *name, void *data) {
 1477|      1|  __kmp_stg_print_uint64(buffer, name, __kmp_taskloop_min_tasks);
 1478|      1|} // __kmp_stg_print_taskloop_min_tasks
kmp_settings.cpp:_ZL22__kmp_stg_print_uint64P11kmp_str_bufPKcy:
  599|      1|                                   kmp_uint64 value) {
  600|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (600:7): [True: 0, False: 1]
  ------------------
  601|      0|    KMP_STR_BUF_PRINT_UINT64;
  ------------------
  |  |   62|      0|  __kmp_str_buf_print(buffer, "  %s %s='%" KMP_UINT64_SPEC "'\n",              \
  |  |   63|      0|                      KMP_I18N_STR(Host), name, value);
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
  602|      1|  } else {
  603|      1|    __kmp_str_buf_print(buffer, "   %s=%" KMP_UINT64_SPEC "\n", name, value);
  604|      1|  }
  605|      1|} // __kmp_stg_print_uint64
kmp_settings.cpp:_ZL28__kmp_stg_print_thread_limitP11kmp_str_bufPKcPv:
  673|      1|                                         char const *name, void *data) {
  674|      1|  __kmp_stg_print_int(buffer, name, __kmp_cg_max_nth);
  675|      1|} // __kmp_stg_print_thread_limit
kmp_settings.cpp:_ZL34__kmp_stg_print_teams_thread_limitP11kmp_str_bufPKcPv:
  712|      1|                                               char const *name, void *data) {
  713|      1|  __kmp_stg_print_int(buffer, name, __kmp_teams_max_nth);
  714|      1|} // __kmp_stg_print_teams_thread_limit
kmp_settings.cpp:_ZL22__kmp_stg_print_nteamsP11kmp_str_bufPKcPv:
  686|      1|                                   void *data) {
  687|      1|  __kmp_stg_print_int(buffer, name, __kmp_nteams);
  688|      1|} // __kmp_stg_print_nteams
kmp_settings.cpp:_ZL30__kmp_stg_print_teams_th_limitP11kmp_str_bufPKcPv:
  700|      1|                                           char const *name, void *data) {
  701|      1|  __kmp_stg_print_int(buffer, name, __kmp_teams_thread_limit);
  702|      1|} // __kmp_stg_print_teams_th_limit
kmp_settings.cpp:_ZL28__kmp_stg_print_disp_buffersP11kmp_str_bufPKcPv:
 1493|      1|                                         char const *name, void *data) {
 1494|      1|  __kmp_stg_print_int(buffer, name, __kmp_dispatch_num_buffers);
 1495|      1|} // __kmp_stg_print_disp_buffers
kmp_settings.cpp:_ZL31__kmp_stg_print_hot_teams_levelP11kmp_str_bufPKcPv:
 1512|      1|                                            char const *name, void *data) {
 1513|      1|  __kmp_stg_print_int(buffer, name, __kmp_hot_teams_max_level);
 1514|      1|} // __kmp_stg_print_hot_teams_level
kmp_settings.cpp:_ZL30__kmp_stg_print_hot_teams_modeP11kmp_str_bufPKcPv:
 1527|      1|                                           char const *name, void *data) {
 1528|      1|  __kmp_stg_print_int(buffer, name, __kmp_hot_teams_mode);
 1529|      1|} // __kmp_stg_print_hot_teams_mode
kmp_settings.cpp:_ZL30__kmp_stg_print_handle_signalsP11kmp_str_bufPKcPv:
 1544|      1|                                           char const *name, void *data) {
 1545|      1|  __kmp_stg_print_bool(buffer, name, __kmp_handle_signals);
 1546|      1|} // __kmp_stg_print_handle_signals
kmp_settings.cpp:_ZL34__kmp_stg_print_inherit_fp_controlP11kmp_str_bufPKcPv:
  800|      1|                                               char const *name, void *data) {
  801|       |#if KMP_DEBUG
  802|       |  __kmp_stg_print_bool(buffer, name, __kmp_inherit_fp_control);
  803|       |#endif /* KMP_DEBUG */
  804|      1|} // __kmp_stg_print_inherit_fp_control
kmp_settings.cpp:_ZL27__kmp_stg_print_align_allocP11kmp_str_bufPKcPv:
 1677|      1|                                        void *data) {
 1678|      1|  __kmp_stg_print_size(buffer, name, __kmp_align_alloc);
 1679|      1|} // __kmp_stg_print_align_alloc
kmp_settings.cpp:_ZL34__kmp_stg_print_barrier_branch_bitP11kmp_str_bufPKcPv:
 1727|      3|                                               char const *name, void *data) {
 1728|      3|  const char *var;
 1729|     12|  for (int i = bs_plain_barrier; i < bs_last_barrier; i++) {
  ------------------
  |  Branch (1729:34): [True: 9, False: 3]
  ------------------
 1730|      9|    var = __kmp_barrier_branch_bit_env_name[i];
 1731|      9|    if (strcmp(var, name) == 0) {
  ------------------
  |  Branch (1731:9): [True: 3, False: 6]
  ------------------
 1732|      3|      if (__kmp_env_format) {
  ------------------
  |  Branch (1732:11): [True: 0, False: 3]
  ------------------
 1733|      0|        KMP_STR_BUF_PRINT_NAME_EX(__kmp_barrier_branch_bit_env_name[i]);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1734|      3|      } else {
 1735|      3|        __kmp_str_buf_print(buffer, "   %s='",
 1736|      3|                            __kmp_barrier_branch_bit_env_name[i]);
 1737|      3|      }
 1738|      3|      __kmp_str_buf_print(buffer, "%d,%d'\n",
 1739|      3|                          __kmp_barrier_gather_branch_bits[i],
 1740|      3|                          __kmp_barrier_release_branch_bits[i]);
 1741|      3|    }
 1742|      9|  }
 1743|      3|} // __kmp_stg_print_barrier_branch_bit
kmp_settings.cpp:_ZL31__kmp_stg_print_barrier_patternP11kmp_str_bufPKcPv:
 1825|      3|                                            char const *name, void *data) {
 1826|      3|  const char *var;
 1827|     12|  for (int i = bs_plain_barrier; i < bs_last_barrier; i++) {
  ------------------
  |  Branch (1827:34): [True: 9, False: 3]
  ------------------
 1828|      9|    var = __kmp_barrier_pattern_env_name[i];
 1829|      9|    if (strcmp(var, name) == 0) {
  ------------------
  |  Branch (1829:9): [True: 3, False: 6]
  ------------------
 1830|      3|      int j = __kmp_barrier_gather_pattern[i];
 1831|      3|      int k = __kmp_barrier_release_pattern[i];
 1832|      3|      if (__kmp_env_format) {
  ------------------
  |  Branch (1832:11): [True: 0, False: 3]
  ------------------
 1833|      0|        KMP_STR_BUF_PRINT_NAME_EX(__kmp_barrier_pattern_env_name[i]);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1834|      3|      } else {
 1835|      3|        __kmp_str_buf_print(buffer, "   %s='",
 1836|      3|                            __kmp_barrier_pattern_env_name[i]);
 1837|      3|      }
 1838|      3|      KMP_DEBUG_ASSERT(j < bp_last_bar && k < bp_last_bar);
 1839|      3|      __kmp_str_buf_print(buffer, "%s,%s'\n", __kmp_barrier_pattern_name[j],
 1840|      3|                          __kmp_barrier_pattern_name[k]);
 1841|      3|    }
 1842|      9|  }
 1843|      3|} // __kmp_stg_print_barrier_pattern
kmp_settings.cpp:_ZL27__kmp_stg_print_abort_delayP11kmp_str_bufPKcPv:
 1858|      1|                                        void *data) {
 1859|      1|  __kmp_stg_print_int(buffer, name, __kmp_abort_delay);
 1860|      1|} // __kmp_stg_print_abort_delay
kmp_settings.cpp:_ZL28__kmp_stg_print_cpuinfo_fileP11kmp_str_bufPKcPv:
 1874|      1|                                         char const *name, void *data) {
 1875|      1|#if KMP_AFFINITY_SUPPORTED
 1876|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (1876:7): [True: 0, False: 1]
  ------------------
 1877|      0|    KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1878|      1|  } else {
 1879|      1|    __kmp_str_buf_print(buffer, "   %s", name);
 1880|      1|  }
 1881|      1|  if (__kmp_cpuinfo_file) {
  ------------------
  |  Branch (1881:7): [True: 0, False: 1]
  ------------------
 1882|      0|    __kmp_str_buf_print(buffer, "='%s'\n", __kmp_cpuinfo_file);
 1883|      1|  } else {
 1884|      1|    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 1885|      1|  }
 1886|      1|#endif
 1887|      1|} //__kmp_stg_print_cpuinfo_file
kmp_settings.cpp:_ZL31__kmp_stg_print_force_reductionP11kmp_str_bufPKcPv:
 1926|      2|                                            char const *name, void *data) {
 1927|       |
 1928|      2|  kmp_stg_fr_data_t *reduction = (kmp_stg_fr_data_t *)data;
 1929|      2|  if (reduction->force) {
  ------------------
  |  Branch (1929:7): [True: 1, False: 1]
  ------------------
 1930|      1|    if (__kmp_force_reduction_method == critical_reduce_block) {
  ------------------
  |  Branch (1930:9): [True: 0, False: 1]
  ------------------
 1931|      0|      __kmp_stg_print_str(buffer, name, "critical");
 1932|      1|    } else if (__kmp_force_reduction_method == atomic_reduce_block) {
  ------------------
  |  Branch (1932:16): [True: 0, False: 1]
  ------------------
 1933|      0|      __kmp_stg_print_str(buffer, name, "atomic");
 1934|      1|    } else if (__kmp_force_reduction_method == tree_reduce_block) {
  ------------------
  |  Branch (1934:16): [True: 0, False: 1]
  ------------------
 1935|      0|      __kmp_stg_print_str(buffer, name, "tree");
 1936|      1|    } else {
 1937|      1|      if (__kmp_env_format) {
  ------------------
  |  Branch (1937:11): [True: 0, False: 1]
  ------------------
 1938|      0|        KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 1939|      1|      } else {
 1940|      1|        __kmp_str_buf_print(buffer, "   %s", name);
 1941|      1|      }
 1942|      1|      __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 1943|      1|    }
 1944|      1|  } else {
 1945|      1|    __kmp_stg_print_bool(buffer, name, __kmp_determ_red);
 1946|      1|  }
 1947|       |
 1948|      2|} // __kmp_stg_print_force_reduction
kmp_settings.cpp:_ZL27__kmp_stg_print_storage_mapP11kmp_str_bufPKcPv:
 1967|      1|                                        void *data) {
 1968|      1|  if (__kmp_storage_map_verbose || __kmp_storage_map_verbose_specified) {
  ------------------
  |  Branch (1968:7): [True: 0, False: 1]
  |  Branch (1968:36): [True: 0, False: 1]
  ------------------
 1969|      0|    __kmp_stg_print_str(buffer, name, "verbose");
 1970|      1|  } else {
 1971|      1|    __kmp_stg_print_bool(buffer, name, __kmp_storage_map);
 1972|      1|  }
 1973|      1|} // __kmp_stg_print_storage_map
kmp_settings.cpp:_ZL33__kmp_stg_print_all_threadprivateP11kmp_str_bufPKcPv:
 1986|      1|                                              char const *name, void *data) {
 1987|      1|  __kmp_stg_print_int(buffer, name, __kmp_tp_capacity);
 1988|      1|}
kmp_settings.cpp:_ZL45__kmp_stg_print_foreign_threads_threadprivateP11kmp_str_bufPKcPv:
 2001|      1|                                                          void *data) {
 2002|      1|  __kmp_stg_print_bool(buffer, name, __kmp_foreign_tp);
 2003|      1|} // __kmp_stg_print_foreign_threads_threadprivate
kmp_settings.cpp:_ZL24__kmp_stg_print_affinityP11kmp_str_bufPKcPv:
 2675|      1|                                     void *data) {
 2676|      1|  __kmp_print_affinity_env(buffer, name, __kmp_affinity);
 2677|      1|}
kmp_settings.cpp:_ZL24__kmp_print_affinity_envP11kmp_str_bufPKcRK14kmp_affinity_t:
 2597|      2|                                     const kmp_affinity_t &affinity) {
 2598|      2|  bool is_hh_affinity = (&affinity == &__kmp_hh_affinity);
 2599|      2|  if (__kmp_env_format) {
  ------------------
  |  Branch (2599:7): [True: 0, False: 2]
  ------------------
 2600|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 2601|      2|  } else {
 2602|      2|    __kmp_str_buf_print(buffer, "   %s='", name);
 2603|      2|  }
 2604|      2|  if (affinity.flags.verbose) {
  ------------------
  |  Branch (2604:7): [True: 0, False: 2]
  ------------------
 2605|      0|    __kmp_str_buf_print(buffer, "%s,", "verbose");
 2606|      2|  } else {
 2607|      2|    __kmp_str_buf_print(buffer, "%s,", "noverbose");
 2608|      2|  }
 2609|      2|  if (affinity.flags.warnings) {
  ------------------
  |  Branch (2609:7): [True: 2, False: 0]
  ------------------
 2610|      2|    __kmp_str_buf_print(buffer, "%s,", "warnings");
 2611|      2|  } else {
 2612|      0|    __kmp_str_buf_print(buffer, "%s,", "nowarnings");
 2613|      0|  }
 2614|      2|  if (KMP_AFFINITY_CAPABLE()) {
  ------------------
  |  |  684|      2|#define KMP_AFFINITY_CAPABLE() (__kmp_affin_mask_size > 0)
  |  |  ------------------
  |  |  |  Branch (684:32): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 2615|       |    // Hidden helper affinity does not affect global reset
 2616|       |    // or respect flags. That is still solely controlled by KMP_AFFINITY.
 2617|      0|    if (!is_hh_affinity) {
  ------------------
  |  Branch (2617:9): [True: 0, False: 0]
  ------------------
 2618|      0|      if (affinity.flags.respect) {
  ------------------
  |  Branch (2618:11): [True: 0, False: 0]
  ------------------
 2619|      0|        __kmp_str_buf_print(buffer, "%s,", "respect");
 2620|      0|      } else {
 2621|      0|        __kmp_str_buf_print(buffer, "%s,", "norespect");
 2622|      0|      }
 2623|      0|      if (affinity.flags.reset) {
  ------------------
  |  Branch (2623:11): [True: 0, False: 0]
  ------------------
 2624|      0|        __kmp_str_buf_print(buffer, "%s,", "reset");
 2625|      0|      } else {
 2626|      0|        __kmp_str_buf_print(buffer, "%s,", "noreset");
 2627|      0|      }
 2628|      0|    }
 2629|      0|    __kmp_str_buf_print(buffer, "granularity=%s,",
 2630|      0|                        __kmp_hw_get_keyword(affinity.gran, false));
 2631|      0|  }
 2632|      2|  if (!KMP_AFFINITY_CAPABLE()) {
  ------------------
  |  |  684|      2|#define KMP_AFFINITY_CAPABLE() (__kmp_affin_mask_size > 0)
  ------------------
  |  Branch (2632:7): [True: 2, False: 0]
  ------------------
 2633|      2|    __kmp_str_buf_print(buffer, "%s", "disabled");
 2634|      2|  } else {
 2635|      0|    int compact = affinity.compact;
 2636|      0|    int offset = affinity.offset;
 2637|      0|    switch (affinity.type) {
 2638|      0|    case affinity_none:
  ------------------
  |  Branch (2638:5): [True: 0, False: 0]
  ------------------
 2639|      0|      __kmp_str_buf_print(buffer, "%s", "none");
 2640|      0|      break;
 2641|      0|    case affinity_physical:
  ------------------
  |  Branch (2641:5): [True: 0, False: 0]
  ------------------
 2642|      0|      __kmp_str_buf_print(buffer, "%s,%d", "physical", offset);
 2643|      0|      break;
 2644|      0|    case affinity_logical:
  ------------------
  |  Branch (2644:5): [True: 0, False: 0]
  ------------------
 2645|      0|      __kmp_str_buf_print(buffer, "%s,%d", "logical", offset);
 2646|      0|      break;
 2647|      0|    case affinity_compact:
  ------------------
  |  Branch (2647:5): [True: 0, False: 0]
  ------------------
 2648|      0|      __kmp_str_buf_print(buffer, "%s,%d,%d", "compact", compact, offset);
 2649|      0|      break;
 2650|      0|    case affinity_scatter:
  ------------------
  |  Branch (2650:5): [True: 0, False: 0]
  ------------------
 2651|      0|      __kmp_str_buf_print(buffer, "%s,%d,%d", "scatter", compact, offset);
 2652|      0|      break;
 2653|      0|    case affinity_explicit:
  ------------------
  |  Branch (2653:5): [True: 0, False: 0]
  ------------------
 2654|      0|      __kmp_str_buf_print(buffer, "%s=[%s],%s", "proclist", affinity.proclist,
 2655|      0|                          "explicit");
 2656|      0|      break;
 2657|      0|    case affinity_balanced:
  ------------------
  |  Branch (2657:5): [True: 0, False: 0]
  ------------------
 2658|      0|      __kmp_str_buf_print(buffer, "%s,%d,%d", "balanced", compact, offset);
 2659|      0|      break;
 2660|      0|    case affinity_disabled:
  ------------------
  |  Branch (2660:5): [True: 0, False: 0]
  ------------------
 2661|      0|      __kmp_str_buf_print(buffer, "%s", "disabled");
 2662|      0|      break;
 2663|      0|    case affinity_default:
  ------------------
  |  Branch (2663:5): [True: 0, False: 0]
  ------------------
 2664|      0|      __kmp_str_buf_print(buffer, "%s", "default");
 2665|      0|      break;
 2666|      0|    default:
  ------------------
  |  Branch (2666:5): [True: 0, False: 0]
  ------------------
 2667|      0|      __kmp_str_buf_print(buffer, "%s", "<unknown>");
 2668|      0|      break;
 2669|      0|    }
 2670|      0|  }
 2671|      2|  __kmp_str_buf_print(buffer, "'\n");
 2672|      2|} //__kmp_stg_print_affinity
kmp_settings.cpp:_ZL27__kmp_stg_print_hh_affinityP11kmp_str_bufPKcPv:
 2679|      1|                                        void *data) {
 2680|      1|  __kmp_print_affinity_env(buffer, name, __kmp_hh_affinity);
 2681|      1|}
kmp_settings.cpp:_ZL25__kmp_stg_print_proc_bindP11kmp_str_bufPKcPv:
 3471|      1|                                      void *data) {
 3472|      1|  int nelem = __kmp_nested_proc_bind.used;
 3473|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (3473:7): [True: 0, False: 1]
  ------------------
 3474|      0|    KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 3475|      1|  } else {
 3476|      1|    __kmp_str_buf_print(buffer, "   %s", name);
 3477|      1|  }
 3478|      1|  if (nelem == 0) {
  ------------------
  |  Branch (3478:7): [True: 1, False: 0]
  ------------------
 3479|      1|    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 3480|      1|  } else {
 3481|      0|    int i;
 3482|      0|    __kmp_str_buf_print(buffer, "='", name);
 3483|      0|    for (i = 0; i < nelem; i++) {
  ------------------
  |  Branch (3483:17): [True: 0, False: 0]
  ------------------
 3484|      0|      switch (__kmp_nested_proc_bind.bind_types[i]) {
  ------------------
  |  Branch (3484:15): [True: 0, False: 0]
  ------------------
 3485|      0|      case proc_bind_false:
  ------------------
  |  Branch (3485:7): [True: 0, False: 0]
  ------------------
 3486|      0|        __kmp_str_buf_print(buffer, "false");
 3487|      0|        break;
 3488|       |
 3489|      0|      case proc_bind_true:
  ------------------
  |  Branch (3489:7): [True: 0, False: 0]
  ------------------
 3490|      0|        __kmp_str_buf_print(buffer, "true");
 3491|      0|        break;
 3492|       |
 3493|      0|      case proc_bind_primary:
  ------------------
  |  Branch (3493:7): [True: 0, False: 0]
  ------------------
 3494|      0|        __kmp_str_buf_print(buffer, "primary");
 3495|      0|        break;
 3496|       |
 3497|      0|      case proc_bind_close:
  ------------------
  |  Branch (3497:7): [True: 0, False: 0]
  ------------------
 3498|      0|        __kmp_str_buf_print(buffer, "close");
 3499|      0|        break;
 3500|       |
 3501|      0|      case proc_bind_spread:
  ------------------
  |  Branch (3501:7): [True: 0, False: 0]
  ------------------
 3502|      0|        __kmp_str_buf_print(buffer, "spread");
 3503|      0|        break;
 3504|       |
 3505|      0|      case proc_bind_intel:
  ------------------
  |  Branch (3505:7): [True: 0, False: 0]
  ------------------
 3506|      0|        __kmp_str_buf_print(buffer, "intel");
 3507|      0|        break;
 3508|       |
 3509|      0|      case proc_bind_default:
  ------------------
  |  Branch (3509:7): [True: 0, False: 0]
  ------------------
 3510|      0|        __kmp_str_buf_print(buffer, "default");
 3511|      0|        break;
 3512|      0|      }
 3513|      0|      if (i < nelem - 1) {
  ------------------
  |  Branch (3513:11): [True: 0, False: 0]
  ------------------
 3514|      0|        __kmp_str_buf_print(buffer, ",");
 3515|      0|      }
 3516|      0|    }
 3517|      0|    __kmp_str_buf_print(buffer, "'\n");
 3518|      0|  }
 3519|      1|}
kmp_settings.cpp:_ZL31__kmp_stg_print_teams_proc_bindP11kmp_str_bufPKcPv:
 3321|      1|                                            char const *name, void *data) {
 3322|      1|  const char *value = KMP_I18N_STR(NotDefined);
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 3323|      1|  for (size_t i = 0; i < sizeof(proc_bind_table) / sizeof(proc_bind_table[0]);
  ------------------
  |  Branch (3323:22): [True: 1, False: 0]
  ------------------
 3324|      1|       ++i) {
 3325|      1|    if (__kmp_teams_proc_bind == proc_bind_table[i].proc_bind) {
  ------------------
  |  Branch (3325:9): [True: 1, False: 0]
  ------------------
 3326|      1|      value = proc_bind_table[i].name;
 3327|      1|      break;
 3328|      1|    }
 3329|      1|  }
 3330|      1|  __kmp_stg_print_str(buffer, name, value);
 3331|      1|}
kmp_settings.cpp:_ZL22__kmp_stg_print_placesP11kmp_str_bufPKcPv:
 3108|      1|                                   void *data) {
 3109|      1|  enum affinity_type type = __kmp_affinity.type;
 3110|      1|  const char *proclist = __kmp_affinity.proclist;
 3111|      1|  kmp_hw_t gran = __kmp_affinity.gran;
 3112|       |
 3113|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (3113:7): [True: 0, False: 1]
  ------------------
 3114|      0|    KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 3115|      1|  } else {
 3116|      1|    __kmp_str_buf_print(buffer, "   %s", name);
 3117|      1|  }
 3118|      1|  if ((__kmp_nested_proc_bind.used == 0) ||
  ------------------
  |  Branch (3118:7): [True: 1, False: 0]
  ------------------
 3119|      0|      (__kmp_nested_proc_bind.bind_types == NULL) ||
  ------------------
  |  Branch (3119:7): [True: 0, False: 0]
  ------------------
 3120|      1|      (__kmp_nested_proc_bind.bind_types[0] == proc_bind_false)) {
  ------------------
  |  Branch (3120:7): [True: 0, False: 0]
  ------------------
 3121|      1|    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 3122|      1|  } else if (type == affinity_explicit) {
  ------------------
  |  Branch (3122:14): [True: 0, False: 0]
  ------------------
 3123|      0|    if (proclist != NULL) {
  ------------------
  |  Branch (3123:9): [True: 0, False: 0]
  ------------------
 3124|      0|      __kmp_str_buf_print(buffer, "='%s'\n", proclist);
 3125|      0|    } else {
 3126|      0|      __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 3127|      0|    }
 3128|      0|  } else if (type == affinity_compact) {
  ------------------
  |  Branch (3128:14): [True: 0, False: 0]
  ------------------
 3129|      0|    int num;
 3130|      0|    if (__kmp_affinity.num_masks > 0) {
  ------------------
  |  Branch (3130:9): [True: 0, False: 0]
  ------------------
 3131|      0|      num = __kmp_affinity.num_masks;
 3132|      0|    } else if (__kmp_affinity_num_places > 0) {
  ------------------
  |  Branch (3132:16): [True: 0, False: 0]
  ------------------
 3133|      0|      num = __kmp_affinity_num_places;
 3134|      0|    } else {
 3135|      0|      num = 0;
 3136|      0|    }
 3137|      0|    if (gran != KMP_HW_UNKNOWN) {
  ------------------
  |  Branch (3137:9): [True: 0, False: 0]
  ------------------
 3138|      0|      const char *name = __kmp_hw_get_keyword(gran, true);
 3139|      0|      if (num > 0) {
  ------------------
  |  Branch (3139:11): [True: 0, False: 0]
  ------------------
 3140|      0|        __kmp_str_buf_print(buffer, "='%s(%d)'\n", name, num);
 3141|      0|      } else {
 3142|      0|        __kmp_str_buf_print(buffer, "='%s'\n", name);
 3143|      0|      }
 3144|      0|    } else {
 3145|      0|      __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 3146|      0|    }
 3147|      0|  } else {
 3148|      0|    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 3149|      0|  }
 3150|      1|}
kmp_settings.cpp:_ZL31__kmp_stg_print_topology_methodP11kmp_str_bufPKcPv:
 3239|      1|                                            char const *name, void *data) {
 3240|      1|  char const *value = NULL;
 3241|       |
 3242|      1|  switch (__kmp_affinity_top_method) {
  ------------------
  |  Branch (3242:11): [True: 1, False: 0]
  ------------------
 3243|      1|  case affinity_top_method_default:
  ------------------
  |  Branch (3243:3): [True: 1, False: 0]
  ------------------
 3244|      1|    value = "default";
 3245|      1|    break;
 3246|       |
 3247|      0|  case affinity_top_method_all:
  ------------------
  |  Branch (3247:3): [True: 0, False: 1]
  ------------------
 3248|      0|    value = "all";
 3249|      0|    break;
 3250|       |
 3251|      0|#if KMP_ARCH_X86 || KMP_ARCH_X86_64
 3252|      0|  case affinity_top_method_x2apicid_1f:
  ------------------
  |  Branch (3252:3): [True: 0, False: 1]
  ------------------
 3253|      0|    value = "x2APIC id leaf 0x1f";
 3254|      0|    break;
 3255|       |
 3256|      0|  case affinity_top_method_x2apicid:
  ------------------
  |  Branch (3256:3): [True: 0, False: 1]
  ------------------
 3257|      0|    value = "x2APIC id leaf 0xb";
 3258|      0|    break;
 3259|       |
 3260|      0|  case affinity_top_method_apicid:
  ------------------
  |  Branch (3260:3): [True: 0, False: 1]
  ------------------
 3261|      0|    value = "APIC id";
 3262|      0|    break;
 3263|      0|#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
 3264|       |
 3265|       |#if KMP_USE_HWLOC
 3266|       |  case affinity_top_method_hwloc:
 3267|       |    value = "hwloc";
 3268|       |    break;
 3269|       |#endif
 3270|       |
 3271|      0|  case affinity_top_method_cpuinfo:
  ------------------
  |  Branch (3271:3): [True: 0, False: 1]
  ------------------
 3272|      0|    value = "cpuinfo";
 3273|      0|    break;
 3274|       |
 3275|       |#if KMP_GROUP_AFFINITY
 3276|       |  case affinity_top_method_group:
 3277|       |    value = "group";
 3278|       |    break;
 3279|       |#endif /* KMP_GROUP_AFFINITY */
 3280|       |
 3281|      0|  case affinity_top_method_flat:
  ------------------
  |  Branch (3281:3): [True: 0, False: 1]
  ------------------
 3282|      0|    value = "flat";
 3283|      0|    break;
 3284|      1|  }
 3285|       |
 3286|      1|  if (value != NULL) {
  ------------------
  |  Branch (3286:7): [True: 1, False: 0]
  ------------------
 3287|      1|    __kmp_stg_print_str(buffer, name, value);
 3288|      1|  }
 3289|      1|} // __kmp_stg_print_topology_method
kmp_settings.cpp:_ZL32__kmp_stg_print_display_affinityP11kmp_str_bufPKcPv:
 3526|      1|                                             char const *name, void *data) {
 3527|      1|  __kmp_stg_print_bool(buffer, name, __kmp_display_affinity);
 3528|      1|}
kmp_settings.cpp:_ZL31__kmp_stg_print_affinity_formatP11kmp_str_bufPKcPv:
 3536|      1|                                            char const *name, void *data) {
 3537|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (3537:7): [True: 0, False: 1]
  ------------------
 3538|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 3539|      1|  } else {
 3540|      1|    __kmp_str_buf_print(buffer, "   %s='", name);
 3541|      1|  }
 3542|      1|  __kmp_str_buf_print(buffer, "%s'\n", __kmp_affinity_format);
 3543|      1|}
kmp_settings.cpp:_ZL28__kmp_stg_print_init_at_forkP11kmp_str_bufPKcPv:
 3999|      1|                                         char const *name, void *data) {
 4000|      1|  __kmp_stg_print_bool(buffer, name, __kmp_need_register_atfork_specified);
 4001|      1|} // __kmp_stg_print_init_at_fork
kmp_settings.cpp:_ZL24__kmp_stg_print_scheduleP11kmp_str_bufPKcPv:
 4060|      1|                                     void *data) {
 4061|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (4061:7): [True: 0, False: 1]
  ------------------
 4062|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 4063|      1|  } else {
 4064|      1|    __kmp_str_buf_print(buffer, "   %s='", name);
 4065|      1|  }
 4066|      1|  if (__kmp_static == kmp_sch_static_greedy) {
  ------------------
  |  Branch (4066:7): [True: 1, False: 0]
  ------------------
 4067|      1|    __kmp_str_buf_print(buffer, "%s", "static,greedy");
 4068|      1|  } else if (__kmp_static == kmp_sch_static_balanced) {
  ------------------
  |  Branch (4068:14): [True: 0, False: 0]
  ------------------
 4069|      0|    __kmp_str_buf_print(buffer, "%s", "static,balanced");
 4070|      0|  }
 4071|      1|  if (__kmp_guided == kmp_sch_guided_iterative_chunked) {
  ------------------
  |  Branch (4071:7): [True: 1, False: 0]
  ------------------
 4072|      1|    __kmp_str_buf_print(buffer, ";%s'\n", "guided,iterative");
 4073|      1|  } else if (__kmp_guided == kmp_sch_guided_analytical_chunked) {
  ------------------
  |  Branch (4073:14): [True: 0, False: 0]
  ------------------
 4074|      0|    __kmp_str_buf_print(buffer, ";%s'\n", "guided,analytical");
 4075|      0|  }
 4076|      1|} // __kmp_stg_print_schedule
kmp_settings.cpp:_ZL28__kmp_stg_print_omp_scheduleP11kmp_str_bufPKcPv:
 4272|      1|                                         char const *name, void *data) {
 4273|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (4273:7): [True: 0, False: 1]
  ------------------
 4274|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 4275|      1|  } else {
 4276|      1|    __kmp_str_buf_print(buffer, "   %s='", name);
 4277|      1|  }
 4278|      1|  enum sched_type sched = SCHEDULE_WITHOUT_MODIFIERS(__kmp_sched);
  ------------------
  |  |  451|      1|  (enum sched_type)(                                                           \
  |  |  452|      1|      (s) & ~(kmp_sch_modifier_nonmonotonic | kmp_sch_modifier_monotonic))
  ------------------
 4279|      1|  if (SCHEDULE_HAS_MONOTONIC(__kmp_sched)) {
  ------------------
  |  |  453|      1|#define SCHEDULE_HAS_MONOTONIC(s) (((s)&kmp_sch_modifier_monotonic) != 0)
  |  |  ------------------
  |  |  |  Branch (453:35): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4280|      0|    __kmp_str_buf_print(buffer, "monotonic:");
 4281|      1|  } else if (SCHEDULE_HAS_NONMONOTONIC(__kmp_sched)) {
  ------------------
  |  |  454|      1|#define SCHEDULE_HAS_NONMONOTONIC(s) (((s)&kmp_sch_modifier_nonmonotonic) != 0)
  |  |  ------------------
  |  |  |  Branch (454:38): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4282|      0|    __kmp_str_buf_print(buffer, "nonmonotonic:");
 4283|      0|  }
 4284|      1|  if (__kmp_chunk) {
  ------------------
  |  Branch (4284:7): [True: 0, False: 1]
  ------------------
 4285|      0|    switch (sched) {
  ------------------
  |  Branch (4285:13): [True: 0, False: 0]
  ------------------
 4286|      0|    case kmp_sch_dynamic_chunked:
  ------------------
  |  Branch (4286:5): [True: 0, False: 0]
  ------------------
 4287|      0|      __kmp_str_buf_print(buffer, "%s,%d'\n", "dynamic", __kmp_chunk);
 4288|      0|      break;
 4289|      0|    case kmp_sch_guided_iterative_chunked:
  ------------------
  |  Branch (4289:5): [True: 0, False: 0]
  ------------------
 4290|      0|    case kmp_sch_guided_analytical_chunked:
  ------------------
  |  Branch (4290:5): [True: 0, False: 0]
  ------------------
 4291|      0|      __kmp_str_buf_print(buffer, "%s,%d'\n", "guided", __kmp_chunk);
 4292|      0|      break;
 4293|      0|    case kmp_sch_trapezoidal:
  ------------------
  |  Branch (4293:5): [True: 0, False: 0]
  ------------------
 4294|      0|      __kmp_str_buf_print(buffer, "%s,%d'\n", "trapezoidal", __kmp_chunk);
 4295|      0|      break;
 4296|      0|    case kmp_sch_static:
  ------------------
  |  Branch (4296:5): [True: 0, False: 0]
  ------------------
 4297|      0|    case kmp_sch_static_chunked:
  ------------------
  |  Branch (4297:5): [True: 0, False: 0]
  ------------------
 4298|      0|    case kmp_sch_static_balanced:
  ------------------
  |  Branch (4298:5): [True: 0, False: 0]
  ------------------
 4299|      0|    case kmp_sch_static_greedy:
  ------------------
  |  Branch (4299:5): [True: 0, False: 0]
  ------------------
 4300|      0|      __kmp_str_buf_print(buffer, "%s,%d'\n", "static", __kmp_chunk);
 4301|      0|      break;
 4302|      0|    case kmp_sch_static_steal:
  ------------------
  |  Branch (4302:5): [True: 0, False: 0]
  ------------------
 4303|      0|      __kmp_str_buf_print(buffer, "%s,%d'\n", "static_steal", __kmp_chunk);
 4304|      0|      break;
 4305|      0|    case kmp_sch_auto:
  ------------------
  |  Branch (4305:5): [True: 0, False: 0]
  ------------------
 4306|      0|      __kmp_str_buf_print(buffer, "%s,%d'\n", "auto", __kmp_chunk);
 4307|      0|      break;
 4308|      0|    }
 4309|      1|  } else {
 4310|      1|    switch (sched) {
  ------------------
  |  Branch (4310:13): [True: 1, False: 0]
  ------------------
 4311|      0|    case kmp_sch_dynamic_chunked:
  ------------------
  |  Branch (4311:5): [True: 0, False: 1]
  ------------------
 4312|      0|      __kmp_str_buf_print(buffer, "%s'\n", "dynamic");
 4313|      0|      break;
 4314|      0|    case kmp_sch_guided_iterative_chunked:
  ------------------
  |  Branch (4314:5): [True: 0, False: 1]
  ------------------
 4315|      0|    case kmp_sch_guided_analytical_chunked:
  ------------------
  |  Branch (4315:5): [True: 0, False: 1]
  ------------------
 4316|      0|      __kmp_str_buf_print(buffer, "%s'\n", "guided");
 4317|      0|      break;
 4318|      0|    case kmp_sch_trapezoidal:
  ------------------
  |  Branch (4318:5): [True: 0, False: 1]
  ------------------
 4319|      0|      __kmp_str_buf_print(buffer, "%s'\n", "trapezoidal");
 4320|      0|      break;
 4321|      1|    case kmp_sch_static:
  ------------------
  |  Branch (4321:5): [True: 1, False: 0]
  ------------------
 4322|      1|    case kmp_sch_static_chunked:
  ------------------
  |  Branch (4322:5): [True: 0, False: 1]
  ------------------
 4323|      1|    case kmp_sch_static_balanced:
  ------------------
  |  Branch (4323:5): [True: 0, False: 1]
  ------------------
 4324|      1|    case kmp_sch_static_greedy:
  ------------------
  |  Branch (4324:5): [True: 0, False: 1]
  ------------------
 4325|      1|      __kmp_str_buf_print(buffer, "%s'\n", "static");
 4326|      1|      break;
 4327|      0|    case kmp_sch_static_steal:
  ------------------
  |  Branch (4327:5): [True: 0, False: 1]
  ------------------
 4328|      0|      __kmp_str_buf_print(buffer, "%s'\n", "static_steal");
 4329|      0|      break;
 4330|      0|    case kmp_sch_auto:
  ------------------
  |  Branch (4330:5): [True: 0, False: 1]
  ------------------
 4331|      0|      __kmp_str_buf_print(buffer, "%s'\n", "auto");
 4332|      0|      break;
 4333|      1|    }
 4334|      1|  }
 4335|      1|} // __kmp_stg_print_omp_schedule
kmp_settings.cpp:_ZL35__kmp_stg_print_kmp_force_monotonicP11kmp_str_bufPKcPv:
 4359|      1|                                                char const *name, void *data) {
 4360|      1|  __kmp_stg_print_bool(buffer, name, __kmp_force_monotonic);
 4361|      1|} // __kmp_stg_print_kmp_force_monotonic
kmp_settings.cpp:_ZL27__kmp_stg_print_atomic_modeP11kmp_str_bufPKcPv:
 4385|      1|                                        void *data) {
 4386|      1|  __kmp_stg_print_int(buffer, name, __kmp_atomic_mode);
 4387|      1|} // __kmp_stg_print_atomic_mode
kmp_settings.cpp:_ZL33__kmp_stg_print_consistency_checkP11kmp_str_bufPKcPv:
 4409|      1|                                              char const *name, void *data) {
 4410|       |#if KMP_DEBUG
 4411|       |  const char *value = NULL;
 4412|       |
 4413|       |  if (__kmp_env_consistency_check) {
 4414|       |    value = "all";
 4415|       |  } else {
 4416|       |    value = "none";
 4417|       |  }
 4418|       |
 4419|       |  if (value != NULL) {
 4420|       |    __kmp_stg_print_str(buffer, name, value);
 4421|       |  }
 4422|       |#endif /* KMP_DEBUG */
 4423|      1|} // __kmp_stg_print_consistency_check
kmp_settings.cpp:_ZL32__kmp_stg_print_malloc_pool_incrP11kmp_str_bufPKcPv:
 4460|      1|                                             char const *name, void *data) {
 4461|      1|  __kmp_stg_print_size(buffer, name, __kmp_malloc_pool_incr);
 4462|       |
 4463|      1|} // _kmp_stg_print_malloc_pool_incr
kmp_settings.cpp:_ZL25__kmp_stg_print_gtid_modeP11kmp_str_bufPKcPv:
 4514|      1|                                      void *data) {
 4515|      1|  if (__kmp_adjust_gtid_mode) {
  ------------------
  |  Branch (4515:7): [True: 0, False: 1]
  ------------------
 4516|      0|    __kmp_stg_print_int(buffer, name, 0);
 4517|      1|  } else {
 4518|      1|    __kmp_stg_print_int(buffer, name, __kmp_gtid_mode);
 4519|      1|  }
 4520|      1|} // __kmp_stg_print_gtid_mode
kmp_settings.cpp:_ZL27__kmp_stg_print_omp_dynamicP11kmp_str_bufPKcPv:
 3908|      1|                                        void *data) {
 3909|      1|  __kmp_stg_print_bool(buffer, name, __kmp_global.g.g_dynamic);
 3910|      1|} // __kmp_stg_print_omp_dynamic
kmp_settings.cpp:_ZL32__kmp_stg_print_kmp_dynamic_modeP11kmp_str_bufPKcPv:
 3942|      1|                                             char const *name, void *data) {
 3943|       |#if KMP_DEBUG
 3944|       |  if (__kmp_global.g.g_dynamic_mode == dynamic_default) {
 3945|       |    __kmp_str_buf_print(buffer, "   %s: %s \n", name, KMP_I18N_STR(NotDefined));
 3946|       |  }
 3947|       |#ifdef USE_LOAD_BALANCE
 3948|       |  else if (__kmp_global.g.g_dynamic_mode == dynamic_load_balance) {
 3949|       |    __kmp_stg_print_str(buffer, name, "load balance");
 3950|       |  }
 3951|       |#endif /* USE_LOAD_BALANCE */
 3952|       |  else if (__kmp_global.g.g_dynamic_mode == dynamic_thread_limit) {
 3953|       |    __kmp_stg_print_str(buffer, name, "thread limit");
 3954|       |  } else if (__kmp_global.g.g_dynamic_mode == dynamic_random) {
 3955|       |    __kmp_stg_print_str(buffer, name, "random");
 3956|       |  } else {
 3957|       |    KMP_ASSERT(0);
 3958|       |  }
 3959|       |#endif /* KMP_DEBUG */
 3960|      1|} // __kmp_stg_print_kmp_dynamic_mode
kmp_settings.cpp:_ZL35__kmp_stg_print_ld_balance_intervalP11kmp_str_bufPKcPv:
 3978|      1|                                                char const *name, void *data) {
 3979|       |#if KMP_DEBUG
 3980|       |  __kmp_str_buf_print(buffer, "   %s=%8.6f\n", name,
 3981|       |                      __kmp_load_balance_interval);
 3982|       |#endif /* KMP_DEBUG */
 3983|      1|} // __kmp_stg_print_load_balance_interval
kmp_settings.cpp:_ZL26__kmp_stg_print_lock_blockP11kmp_str_bufPKcPv:
 4531|      1|                                       void *data) {
 4532|      1|  __kmp_stg_print_int(buffer, name, __kmp_num_locks_in_block);
 4533|      1|} // __kmp_stg_print_lock_block
kmp_settings.cpp:_ZL25__kmp_stg_print_lock_kindP11kmp_str_bufPKcPv:
 4632|      1|                                      void *data) {
 4633|      1|  const char *value = NULL;
 4634|       |
 4635|      1|  switch (__kmp_user_lock_kind) {
  ------------------
  |  Branch (4635:11): [True: 1, False: 0]
  ------------------
 4636|      1|  case lk_default:
  ------------------
  |  Branch (4636:3): [True: 1, False: 0]
  ------------------
 4637|      1|    value = "default";
 4638|      1|    break;
 4639|       |
 4640|      0|  case lk_tas:
  ------------------
  |  Branch (4640:3): [True: 0, False: 1]
  ------------------
 4641|      0|    value = "tas";
 4642|      0|    break;
 4643|       |
 4644|      0|#if KMP_USE_FUTEX
 4645|      0|  case lk_futex:
  ------------------
  |  Branch (4645:3): [True: 0, False: 1]
  ------------------
 4646|      0|    value = "futex";
 4647|      0|    break;
 4648|      0|#endif
 4649|       |
 4650|      0|#if KMP_USE_DYNAMIC_LOCK && KMP_USE_TSX
 4651|      0|  case lk_rtm_queuing:
  ------------------
  |  Branch (4651:3): [True: 0, False: 1]
  ------------------
 4652|      0|    value = "rtm_queuing";
 4653|      0|    break;
 4654|       |
 4655|      0|  case lk_rtm_spin:
  ------------------
  |  Branch (4655:3): [True: 0, False: 1]
  ------------------
 4656|      0|    value = "rtm_spin";
 4657|      0|    break;
 4658|       |
 4659|      0|  case lk_hle:
  ------------------
  |  Branch (4659:3): [True: 0, False: 1]
  ------------------
 4660|      0|    value = "hle";
 4661|      0|    break;
 4662|      0|#endif
 4663|       |
 4664|      0|  case lk_ticket:
  ------------------
  |  Branch (4664:3): [True: 0, False: 1]
  ------------------
 4665|      0|    value = "ticket";
 4666|      0|    break;
 4667|       |
 4668|      0|  case lk_queuing:
  ------------------
  |  Branch (4668:3): [True: 0, False: 1]
  ------------------
 4669|      0|    value = "queuing";
 4670|      0|    break;
 4671|       |
 4672|      0|  case lk_drdpa:
  ------------------
  |  Branch (4672:3): [True: 0, False: 1]
  ------------------
 4673|      0|    value = "drdpa";
 4674|      0|    break;
 4675|      0|#if KMP_USE_ADAPTIVE_LOCKS
 4676|      0|  case lk_adaptive:
  ------------------
  |  Branch (4676:3): [True: 0, False: 1]
  ------------------
 4677|      0|    value = "adaptive";
 4678|      0|    break;
 4679|      1|#endif
 4680|      1|  }
 4681|       |
 4682|      1|  if (value != NULL) {
  ------------------
  |  Branch (4682:7): [True: 1, False: 0]
  ------------------
 4683|      1|    __kmp_stg_print_str(buffer, name, value);
 4684|      1|  }
 4685|      1|}
kmp_settings.cpp:_ZL35__kmp_stg_print_spin_backoff_paramsP11kmp_str_bufPKcPv:
 4773|      1|                                                char const *name, void *data) {
 4774|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (4774:7): [True: 0, False: 1]
  ------------------
 4775|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 4776|      1|  } else {
 4777|      1|    __kmp_str_buf_print(buffer, "   %s='", name);
 4778|      1|  }
 4779|      1|  __kmp_str_buf_print(buffer, "%d,%d'\n", __kmp_spin_backoff_params.max_backoff,
 4780|      1|                      __kmp_spin_backoff_params.min_tick);
 4781|      1|}
kmp_settings.cpp:_ZL35__kmp_stg_print_adaptive_lock_propsP11kmp_str_bufPKcPv:
 4872|      1|                                                char const *name, void *data) {
 4873|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (4873:7): [True: 0, False: 1]
  ------------------
 4874|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 4875|      1|  } else {
 4876|      1|    __kmp_str_buf_print(buffer, "   %s='", name);
 4877|      1|  }
 4878|      1|  __kmp_str_buf_print(buffer, "%d,%d'\n",
 4879|      1|                      __kmp_adaptive_backoff_params.max_soft_retries,
 4880|      1|                      __kmp_adaptive_backoff_params.max_badness);
 4881|      1|} // __kmp_stg_print_adaptive_lock_props
kmp_settings.cpp:_ZL25__kmp_stg_print_hw_subsetP11kmp_str_bufPKcPv:
 5158|      2|                                      void *data) {
 5159|      2|  kmp_str_buf_t buf;
 5160|      2|  int depth;
 5161|      2|  if (!__kmp_hw_subset)
  ------------------
  |  Branch (5161:7): [True: 2, False: 0]
  ------------------
 5162|      2|    return;
 5163|      0|  __kmp_str_buf_init(&buf);
  ------------------
  |  |   41|      0|  {                                                                            \
  |  |   42|      0|    (b)->str = (b)->bulk;                                                      \
  |  |   43|      0|    (b)->size = sizeof((b)->bulk);                                             \
  |  |   44|      0|    (b)->used = 0;                                                             \
  |  |   45|      0|    (b)->bulk[0] = 0;                                                          \
  |  |   46|      0|  }
  ------------------
 5164|      0|  if (__kmp_env_format)
  ------------------
  |  Branch (5164:7): [True: 0, False: 0]
  ------------------
 5165|      0|    KMP_STR_BUF_PRINT_NAME_EX(name);
  ------------------
  |  |   53|      0|  __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 5166|      0|  else
 5167|      0|    __kmp_str_buf_print(buffer, "   %s='", name);
 5168|       |
 5169|      0|  depth = __kmp_hw_subset->get_depth();
 5170|      0|  for (int i = 0; i < depth; ++i) {
  ------------------
  |  Branch (5170:19): [True: 0, False: 0]
  ------------------
 5171|      0|    const auto &item = __kmp_hw_subset->at(i);
 5172|      0|    if (i > 0)
  ------------------
  |  Branch (5172:9): [True: 0, False: 0]
  ------------------
 5173|      0|      __kmp_str_buf_print(&buf, "%c", ',');
 5174|      0|    for (int j = 0; j < item.num_attrs; ++j) {
  ------------------
  |  Branch (5174:21): [True: 0, False: 0]
  ------------------
 5175|      0|      __kmp_str_buf_print(&buf, "%s%d%s", (j > 0 ? "&" : ""), item.num[j],
  ------------------
  |  Branch (5175:44): [True: 0, False: 0]
  ------------------
 5176|      0|                          __kmp_hw_get_keyword(item.type));
 5177|      0|      if (item.attr[j].is_core_type_valid())
  ------------------
  |  Branch (5177:11): [True: 0, False: 0]
  ------------------
 5178|      0|        __kmp_str_buf_print(
 5179|      0|            &buf, ":%s",
 5180|      0|            __kmp_hw_get_core_type_keyword(item.attr[j].get_core_type()));
 5181|      0|      if (item.attr[j].is_core_eff_valid())
  ------------------
  |  Branch (5181:11): [True: 0, False: 0]
  ------------------
 5182|      0|        __kmp_str_buf_print(&buf, ":eff%d", item.attr[j].get_core_eff());
 5183|      0|      if (item.offset[j])
  ------------------
  |  Branch (5183:11): [True: 0, False: 0]
  ------------------
 5184|      0|        __kmp_str_buf_print(&buf, "@%d", item.offset[j]);
 5185|      0|    }
 5186|      0|  }
 5187|      0|  __kmp_str_buf_print(buffer, "%s'\n", buf.str);
 5188|      0|  __kmp_str_buf_free(&buf);
 5189|      0|}
kmp_settings.cpp:_ZL31__kmp_stg_print_task_throttlingP11kmp_str_bufPKcPv:
 5229|      1|                                            char const *name, void *data) {
 5230|      1|  __kmp_stg_print_bool(buffer, name, __kmp_enable_task_throttling);
 5231|      1|} // __kmp_stg_print_task_throttling
kmp_settings.cpp:_ZL31__kmp_stg_print_omp_display_envP11kmp_str_bufPKcPv:
 5296|      1|                                            char const *name, void *data) {
 5297|      1|  if (__kmp_display_env_verbose) {
  ------------------
  |  Branch (5297:7): [True: 0, False: 1]
  ------------------
 5298|      0|    __kmp_stg_print_str(buffer, name, "VERBOSE");
 5299|      1|  } else {
 5300|      1|    __kmp_stg_print_bool(buffer, name, __kmp_display_env);
 5301|      1|  }
 5302|      1|} // __kmp_stg_print_omp_display_env
kmp_settings.cpp:_ZL32__kmp_stg_print_omp_cancellationP11kmp_str_bufPKcPv:
 5314|      1|                                             char const *name, void *data) {
 5315|      1|  __kmp_stg_print_bool(buffer, name, __kmp_omp_cancellation);
 5316|      1|} // __kmp_stg_print_omp_cancellation
kmp_settings.cpp:_ZL25__kmp_stg_print_allocatorP11kmp_str_bufPKcPv:
 3879|      1|                                      void *data) {
 3880|      1|  if (__kmp_def_allocator == omp_default_mem_alloc) {
  ------------------
  |  Branch (3880:7): [True: 1, False: 0]
  ------------------
 3881|      1|    __kmp_stg_print_str(buffer, name, "omp_default_mem_alloc");
 3882|      1|  } else if (__kmp_def_allocator == omp_high_bw_mem_alloc) {
  ------------------
  |  Branch (3882:14): [True: 0, False: 0]
  ------------------
 3883|      0|    __kmp_stg_print_str(buffer, name, "omp_high_bw_mem_alloc");
 3884|      0|  } else if (__kmp_def_allocator == omp_large_cap_mem_alloc) {
  ------------------
  |  Branch (3884:14): [True: 0, False: 0]
  ------------------
 3885|      0|    __kmp_stg_print_str(buffer, name, "omp_large_cap_mem_alloc");
 3886|      0|  } else if (__kmp_def_allocator == omp_const_mem_alloc) {
  ------------------
  |  Branch (3886:14): [True: 0, False: 0]
  ------------------
 3887|      0|    __kmp_stg_print_str(buffer, name, "omp_const_mem_alloc");
 3888|      0|  } else if (__kmp_def_allocator == omp_low_lat_mem_alloc) {
  ------------------
  |  Branch (3888:14): [True: 0, False: 0]
  ------------------
 3889|      0|    __kmp_stg_print_str(buffer, name, "omp_low_lat_mem_alloc");
 3890|      0|  } else if (__kmp_def_allocator == omp_cgroup_mem_alloc) {
  ------------------
  |  Branch (3890:14): [True: 0, False: 0]
  ------------------
 3891|      0|    __kmp_stg_print_str(buffer, name, "omp_cgroup_mem_alloc");
 3892|      0|  } else if (__kmp_def_allocator == omp_pteam_mem_alloc) {
  ------------------
  |  Branch (3892:14): [True: 0, False: 0]
  ------------------
 3893|      0|    __kmp_stg_print_str(buffer, name, "omp_pteam_mem_alloc");
 3894|      0|  } else if (__kmp_def_allocator == omp_thread_mem_alloc) {
  ------------------
  |  Branch (3894:14): [True: 0, False: 0]
  ------------------
 3895|      0|    __kmp_stg_print_str(buffer, name, "omp_thread_mem_alloc");
 3896|      0|  }
 3897|      1|}
kmp_settings.cpp:_ZL33__kmp_stg_print_use_hidden_helperP11kmp_str_bufPKcPv:
 1323|      1|                                              char const *name, void *data) {
 1324|      1|  __kmp_stg_print_bool(buffer, name, __kmp_enable_hidden_helper);
 1325|      1|} // __kmp_stg_print_use_hidden_helper
kmp_settings.cpp:_ZL41__kmp_stg_print_num_hidden_helper_threadsP11kmp_str_bufPKcPv:
 1300|      1|                                                      void *data) {
 1301|      1|  if (__kmp_hidden_helper_threads_num == 0) {
  ------------------
  |  Branch (1301:7): [True: 0, False: 1]
  ------------------
 1302|      0|    __kmp_stg_print_int(buffer, name, __kmp_hidden_helper_threads_num);
 1303|      1|  } else {
 1304|      1|    KMP_DEBUG_ASSERT(__kmp_hidden_helper_threads_num > 1);
 1305|       |    // Let's exclude the main thread of hidden helper team and print
 1306|       |    // number of worker threads those do actual job.
 1307|      1|    __kmp_stg_print_int(buffer, name, __kmp_hidden_helper_threads_num - 1);
 1308|      1|  }
 1309|      1|} // __kmp_stg_print_num_hidden_helper_threads
kmp_settings.cpp:_ZL24__kmp_stg_print_omp_toolP11kmp_str_bufPKcPv:
 5327|      1|                                     void *data) {
 5328|      1|  if (__kmp_env_format) {
  ------------------
  |  Branch (5328:7): [True: 0, False: 1]
  ------------------
 5329|      0|    KMP_STR_BUF_PRINT_BOOL_EX(name, __kmp_tool, "enabled", "disabled");
  ------------------
  |  |   55|      0|  __kmp_str_buf_print(buffer, "  %s %s='%s'\n", KMP_I18N_STR(Host), n,         \
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  |  |   56|      0|                      (v) ? t : f)
  |  |  ------------------
  |  |  |  Branch (56:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5330|      1|  } else {
 5331|      1|    __kmp_str_buf_print(buffer, "   %s=%s\n", name,
 5332|      1|                        __kmp_tool ? "enabled" : "disabled");
  ------------------
  |  Branch (5332:25): [True: 1, False: 0]
  ------------------
 5333|      1|  }
 5334|      1|} // __kmp_stg_print_omp_tool
kmp_settings.cpp:_ZL34__kmp_stg_print_omp_tool_librariesP11kmp_str_bufPKcPv:
 5344|      1|                                               char const *name, void *data) {
 5345|      1|  if (__kmp_tool_libraries)
  ------------------
  |  Branch (5345:7): [True: 0, False: 1]
  ------------------
 5346|      0|    __kmp_stg_print_str(buffer, name, __kmp_tool_libraries);
 5347|      1|  else {
 5348|      1|    if (__kmp_env_format) {
  ------------------
  |  Branch (5348:9): [True: 0, False: 1]
  ------------------
 5349|      0|      KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 5350|      1|    } else {
 5351|      1|      __kmp_str_buf_print(buffer, "   %s", name);
 5352|      1|    }
 5353|      1|    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 5354|      1|  }
 5355|      1|} // __kmp_stg_print_omp_tool_libraries
kmp_settings.cpp:_ZL37__kmp_stg_print_omp_tool_verbose_initP11kmp_str_bufPKcPv:
 5367|      1|                                                  void *data) {
 5368|      1|  if (__kmp_tool_verbose_init)
  ------------------
  |  Branch (5368:7): [True: 0, False: 1]
  ------------------
 5369|      0|    __kmp_stg_print_str(buffer, name, __kmp_tool_verbose_init);
 5370|      1|  else {
 5371|      1|    if (__kmp_env_format) {
  ------------------
  |  Branch (5371:9): [True: 0, False: 1]
  ------------------
 5372|      0|      KMP_STR_BUF_PRINT_NAME;
  ------------------
  |  |   51|      0|  __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
  |  |  ------------------
  |  |  |  |   46|      0|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  |  |  ------------------
  ------------------
 5373|      1|    } else {
 5374|      1|      __kmp_str_buf_print(buffer, "   %s", name);
 5375|      1|    }
 5376|      1|    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  ------------------
  |  |   46|      1|#define KMP_I18N_STR(id) __kmp_i18n_catgets(kmp_i18n_str_##id)
  ------------------
 5377|      1|  }
 5378|      1|} // __kmp_stg_print_omp_tool_verbose_init
kmp_settings.cpp:_ZL32__kmp_stg_print_user_level_mwaitP11kmp_str_bufPKcPv:
 5243|      1|                                             char const *name, void *data) {
 5244|      1|  __kmp_stg_print_bool(buffer, name, __kmp_user_level_mwait);
 5245|      1|} // __kmp_stg_print_user_level_mwait
kmp_settings.cpp:_ZL27__kmp_stg_print_mwait_hintsP11kmp_str_bufPKcPv:
 5256|      1|                                        void *data) {
 5257|      1|  __kmp_stg_print_int(buffer, name, __kmp_mwait_hints);
 5258|      1|} // __kmp_stg_print_mwait_hints
kmp_settings.cpp:_ZL22__kmp_stg_print_tpauseP11kmp_str_bufPKcPv:
 5278|      1|                                   void *data) {
 5279|      1|  __kmp_stg_print_int(buffer, name, __kmp_tpause_state);
 5280|      1|} // __kmp_stg_print_tpause

__kmp_str_buf_clear:
   71|     83|void __kmp_str_buf_clear(kmp_str_buf_t *buffer) {
   72|     83|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|     83|  {                                                                            \
  |  |   61|     83|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|     83|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|     83|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|     83|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|     83|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|     83|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|     83|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|     83|                                                   : 1);                       \
  |  |   69|     83|  }
  ------------------
   73|     83|  if (buffer->used > 0) {
  ------------------
  |  Branch (73:7): [True: 74, False: 9]
  ------------------
   74|     74|    buffer->used = 0;
   75|     74|    buffer->str[0] = 0;
   76|     74|  }
   77|     83|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|     83|  {                                                                            \
  |  |   61|     83|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|     83|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|     83|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|     83|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|     83|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|     83|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|     83|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|     83|                                                   : 1);                       \
  |  |   69|     83|  }
  ------------------
   78|     83|} // __kmp_str_buf_clear
__kmp_str_buf_reserve:
   80|     68|void __kmp_str_buf_reserve(kmp_str_buf_t *buffer, size_t size) {
   81|     68|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|     68|  {                                                                            \
  |  |   61|     68|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|     68|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|     68|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|     68|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|     68|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|     68|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|     68|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|     68|                                                   : 1);                       \
  |  |   69|     68|  }
  ------------------
   82|     68|  KMP_DEBUG_ASSERT(size >= 0);
   83|       |
   84|     68|  if (buffer->size < (unsigned int)size) {
  ------------------
  |  Branch (84:7): [True: 2, False: 66]
  ------------------
   85|       |    // Calculate buffer size.
   86|      2|    do {
   87|      2|      buffer->size *= 2;
   88|      2|    } while (buffer->size < (unsigned int)size);
  ------------------
  |  Branch (88:14): [True: 0, False: 2]
  ------------------
   89|       |
   90|       |    // Enlarge buffer.
   91|      2|    if (buffer->str == &buffer->bulk[0]) {
  ------------------
  |  Branch (91:9): [True: 1, False: 1]
  ------------------
   92|      1|      buffer->str = (char *)KMP_INTERNAL_MALLOC(buffer->size);
  ------------------
  |  |  110|      1|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
   93|      1|      if (buffer->str == NULL) {
  ------------------
  |  Branch (93:11): [True: 0, False: 1]
  ------------------
   94|      0|        KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
   95|      0|      }
   96|      1|      KMP_MEMCPY_S(buffer->str, buffer->size, buffer->bulk, buffer->used + 1);
  ------------------
  |  |   60|      1|#define KMP_MEMCPY_S(dst, bsz, src, cnt) memcpy(dst, src, cnt)
  ------------------
   97|      1|    } else {
   98|      1|      buffer->str = (char *)KMP_INTERNAL_REALLOC(buffer->str, buffer->size);
  ------------------
  |  |  112|      1|#define KMP_INTERNAL_REALLOC(p, sz) realloc((p), (sz))
  ------------------
   99|      1|      if (buffer->str == NULL) {
  ------------------
  |  Branch (99:11): [True: 0, False: 1]
  ------------------
  100|      0|        KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  101|      0|      }
  102|      1|    }
  103|      2|  }
  104|       |
  105|     68|  KMP_DEBUG_ASSERT(buffer->size > 0);
  106|     68|  KMP_DEBUG_ASSERT(buffer->size >= (unsigned)size);
  107|     68|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|     68|  {                                                                            \
  |  |   61|     68|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|     68|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|     68|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|     68|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|     68|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|     68|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|     68|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|     68|                                                   : 1);                       \
  |  |   69|     68|  }
  ------------------
  108|     68|} // __kmp_str_buf_reserve
__kmp_str_buf_detach:
  110|      1|void __kmp_str_buf_detach(kmp_str_buf_t *buffer) {
  111|      1|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|      1|  {                                                                            \
  |  |   61|      1|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|      1|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|      1|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|      1|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|      1|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|      1|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|      1|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|      1|                                                   : 1);                       \
  |  |   69|      1|  }
  ------------------
  112|       |
  113|       |  // If internal bulk is used, allocate memory and copy it.
  114|      1|  if (buffer->size <= sizeof(buffer->bulk)) {
  ------------------
  |  Branch (114:7): [True: 1, False: 0]
  ------------------
  115|      1|    buffer->str = (char *)KMP_INTERNAL_MALLOC(buffer->size);
  ------------------
  |  |  110|      1|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
  116|      1|    if (buffer->str == NULL) {
  ------------------
  |  Branch (116:9): [True: 0, False: 1]
  ------------------
  117|      0|      KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  118|      0|    }
  119|      1|    KMP_MEMCPY_S(buffer->str, buffer->size, buffer->bulk, buffer->used + 1);
  ------------------
  |  |   60|      1|#define KMP_MEMCPY_S(dst, bsz, src, cnt) memcpy(dst, src, cnt)
  ------------------
  120|      1|  }
  121|      1|} // __kmp_str_buf_detach
__kmp_str_buf_free:
  123|      3|void __kmp_str_buf_free(kmp_str_buf_t *buffer) {
  124|      3|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|      3|  {                                                                            \
  |  |   61|      3|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|      3|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|      3|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|      3|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|      3|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|      3|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|      3|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|      3|                                                   : 1);                       \
  |  |   69|      3|  }
  ------------------
  125|      3|  if (buffer->size > sizeof(buffer->bulk)) {
  ------------------
  |  Branch (125:7): [True: 1, False: 2]
  ------------------
  126|      1|    KMP_INTERNAL_FREE(buffer->str);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  127|      1|  }
  128|      3|  buffer->str = buffer->bulk;
  129|      3|  buffer->size = sizeof(buffer->bulk);
  130|      3|  buffer->used = 0;
  131|      3|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|      3|  {                                                                            \
  |  |   61|      3|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|      3|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|      3|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|      3|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|      3|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|      3|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|      3|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|      3|                                                   : 1);                       \
  |  |   69|      3|  }
  ------------------
  132|      3|} // __kmp_str_buf_free
__kmp_str_buf_cat:
  134|     68|void __kmp_str_buf_cat(kmp_str_buf_t *buffer, char const *str, size_t len) {
  135|     68|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|     68|  {                                                                            \
  |  |   61|     68|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|     68|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|     68|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|     68|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|     68|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|     68|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|     68|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|     68|                                                   : 1);                       \
  |  |   69|     68|  }
  ------------------
  136|     68|  KMP_DEBUG_ASSERT(str != NULL);
  137|     68|  KMP_DEBUG_ASSERT(len >= 0);
  138|       |
  139|     68|  __kmp_str_buf_reserve(buffer, buffer->used + len + 1);
  140|     68|  buffer->str[buffer->used] = '\0';
  141|     68|  KMP_STRNCAT_S(buffer->str + buffer->used, len + 1, str, len);
  ------------------
  |  |   65|     68|#define KMP_STRNCAT_S(dst, bsz, src, cnt) strncat(dst, src, cnt)
  ------------------
  142|     68|  __kmp_type_convert(buffer->used + len, &(buffer->used));
  143|     68|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|     68|  {                                                                            \
  |  |   61|     68|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|     68|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|     68|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|     68|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|     68|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|     68|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|     68|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|     68|                                                   : 1);                       \
  |  |   69|     68|  }
  ------------------
  144|     68|} // __kmp_str_buf_cat
__kmp_str_buf_vprint:
  162|    124|                         va_list args) {
  163|    124|  int rc;
  164|    124|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|    124|  {                                                                            \
  |  |   61|    124|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|    124|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|    124|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|    124|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|    124|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|    124|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|    124|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|    124|                                                   : 1);                       \
  |  |   69|    124|  }
  ------------------
  165|       |
  166|    124|  for (;;) {
  167|    124|    int const free = buffer->size - buffer->used;
  168|    124|    int size;
  169|       |
  170|       |    // Try to format string.
  171|    124|    {
  172|       |      /* On Linux* OS Intel(R) 64, vsnprintf() modifies args argument, so
  173|       |         vsnprintf() crashes if it is called for the second time with the same
  174|       |         args. To prevent the crash, we have to pass a fresh intact copy of args
  175|       |         to vsnprintf() on each iteration.
  176|       |
  177|       |         Unfortunately, standard va_copy() macro is not available on Windows*
  178|       |         OS. However, it seems vsnprintf() does not modify args argument on
  179|       |         Windows* OS.
  180|       |      */
  181|       |
  182|    124|#if !KMP_OS_WINDOWS
  183|    124|      va_list _args;
  184|    124|      va_copy(_args, args); // Make copy of args.
  185|    124|#define args _args // Substitute args with its copy, _args.
  186|    124|#endif // KMP_OS_WINDOWS
  187|    124|      rc = KMP_VSNPRINTF(buffer->str + buffer->used, free, format, args);
  ------------------
  |  |   66|    124|#define KMP_VSNPRINTF vsnprintf
  ------------------
                    rc = KMP_VSNPRINTF(buffer->str + buffer->used, free, format, args);
  ------------------
  |  |  185|    124|#define args _args // Substitute args with its copy, _args.
  ------------------
  188|    124|#if !KMP_OS_WINDOWS
  189|    124|#undef args // Remove substitution.
  190|    124|      va_end(_args);
  191|    124|#endif // KMP_OS_WINDOWS
  192|    124|    }
  193|       |
  194|       |    // No errors, string has been formatted.
  195|    124|    if (rc >= 0 && rc < free) {
  ------------------
  |  Branch (195:9): [True: 124, False: 0]
  |  Branch (195:20): [True: 124, False: 0]
  ------------------
  196|    124|      buffer->used += rc;
  197|    124|      break;
  198|    124|    }
  199|       |
  200|       |    // Error occurred, buffer is too small.
  201|      0|    if (rc >= 0) {
  ------------------
  |  Branch (201:9): [True: 0, False: 0]
  ------------------
  202|       |      // C99-conforming implementation of vsnprintf returns required buffer size
  203|      0|      size = buffer->used + rc + 1;
  204|      0|    } else {
  205|       |      // Older implementations just return -1. Double buffer size.
  206|      0|      size = buffer->size * 2;
  207|      0|    }
  208|       |
  209|       |    // Enlarge buffer.
  210|      0|    __kmp_str_buf_reserve(buffer, size);
  211|       |
  212|       |    // And try again.
  213|      0|  }
  214|       |
  215|    124|  KMP_DEBUG_ASSERT(buffer->size > 0);
  216|    124|  KMP_STR_BUF_INVARIANT(buffer);
  ------------------
  |  |   60|    124|  {                                                                            \
  |  |   61|    124|    KMP_DEBUG_ASSERT((b)->str != NULL);                                        \
  |  |   62|    124|    KMP_DEBUG_ASSERT((b)->size >= sizeof((b)->bulk));                          \
  |  |   63|    124|    KMP_DEBUG_ASSERT((b)->size % sizeof((b)->bulk) == 0);                      \
  |  |   64|    124|    KMP_DEBUG_ASSERT((unsigned)(b)->used < (b)->size);                         \
  |  |   65|    124|    KMP_DEBUG_ASSERT(                                                          \
  |  |   66|    124|        (b)->size == sizeof((b)->bulk) ? (b)->str == &(b)->bulk[0] : 1);       \
  |  |   67|    124|    KMP_DEBUG_ASSERT((b)->size > sizeof((b)->bulk) ? (b)->str != &(b)->bulk[0] \
  |  |   68|    124|                                                   : 1);                       \
  |  |   69|    124|  }
  ------------------
  217|    124|  return rc;
  218|    124|} // __kmp_str_buf_vprint
__kmp_str_buf_print:
  221|    123|int __kmp_str_buf_print(kmp_str_buf_t *buffer, char const *format, ...) {
  222|    123|  int rc;
  223|    123|  va_list args;
  224|    123|  va_start(args, format);
  225|    123|  rc = __kmp_str_buf_vprint(buffer, format, args);
  226|       |  va_end(args);
  227|    123|  return rc;
  228|    123|} // __kmp_str_buf_print
__kmp_str_buf_print_size:
  232|      5|void __kmp_str_buf_print_size(kmp_str_buf_t *buf, size_t size) {
  233|      5|  char const *names[] = {"", "k", "M", "G", "T", "P", "E", "Z", "Y"};
  234|      5|  int const units = sizeof(names) / sizeof(char const *);
  235|      5|  int u = 0;
  236|      5|  if (size > 0) {
  ------------------
  |  Branch (236:7): [True: 5, False: 0]
  ------------------
  237|     11|    while ((size % 1024 == 0) && (u + 1 < units)) {
  ------------------
  |  Branch (237:12): [True: 6, False: 5]
  |  Branch (237:34): [True: 6, False: 0]
  ------------------
  238|      6|      size = size / 1024;
  239|      6|      ++u;
  240|      6|    }
  241|      5|  }
  242|       |
  243|      5|  __kmp_str_buf_print(buf, "%" KMP_SIZE_T_SPEC "%s", size, names[u]);
  244|      5|} // __kmp_str_buf_print_size
__kmp_str_format:
  451|      3|) {
  452|      3|  va_list args;
  453|      3|  int size = 512;
  454|      3|  char *buffer = NULL;
  455|      3|  int rc;
  456|       |
  457|       |  // Allocate buffer.
  458|      3|  buffer = (char *)KMP_INTERNAL_MALLOC(size);
  ------------------
  |  |  110|      3|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
  459|      3|  if (buffer == NULL) {
  ------------------
  |  Branch (459:7): [True: 0, False: 3]
  ------------------
  460|      0|    KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  461|      0|  }
  462|       |
  463|      3|  for (;;) {
  464|       |    // Try to format string.
  465|      3|    va_start(args, format);
  466|      3|    rc = KMP_VSNPRINTF(buffer, size, format, args);
  ------------------
  |  |   66|      3|#define KMP_VSNPRINTF vsnprintf
  ------------------
  467|      3|    va_end(args);
  468|       |
  469|       |    // No errors, string has been formatted.
  470|      3|    if (rc >= 0 && rc < size) {
  ------------------
  |  Branch (470:9): [True: 3, False: 0]
  |  Branch (470:20): [True: 3, False: 0]
  ------------------
  471|      3|      break;
  472|      3|    }
  473|       |
  474|       |    // Error occurred, buffer is too small.
  475|      0|    if (rc >= 0) {
  ------------------
  |  Branch (475:9): [True: 0, False: 0]
  ------------------
  476|       |      // C99-conforming implementation of vsnprintf returns required buffer
  477|       |      // size.
  478|      0|      size = rc + 1;
  479|      0|    } else {
  480|       |      // Older implementations just return -1.
  481|      0|      size = size * 2;
  482|      0|    }
  483|       |
  484|       |    // Enlarge buffer and try again.
  485|      0|    buffer = (char *)KMP_INTERNAL_REALLOC(buffer, size);
  ------------------
  |  |  112|      0|#define KMP_INTERNAL_REALLOC(p, sz) realloc((p), (sz))
  ------------------
  486|      0|    if (buffer == NULL) {
  ------------------
  |  Branch (486:9): [True: 0, False: 0]
  ------------------
  487|      0|      KMP_FATAL(MemoryAllocFailed);
  ------------------
  |  |  146|      0|#define KMP_FATAL(...) __kmp_fatal(KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  488|      0|    }
  489|      0|  }
  490|       |
  491|      3|  return buffer;
  492|      3|} // func __kmp_str_format
__kmp_str_free:
  494|      3|void __kmp_str_free(char **str) {
  495|      3|  KMP_DEBUG_ASSERT(str != NULL);
  496|      3|  KMP_INTERNAL_FREE(*str);
  ------------------
  |  |  111|      3|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  497|       |  *str = NULL;
  498|      3|} // func __kmp_str_free
__kmp_str_split:
  575|     67|) {
  576|     67|  char *h = str;
  577|     67|  char *t = NULL;
  578|     67|  if (str != NULL) {
  ------------------
  |  Branch (578:7): [True: 67, False: 0]
  ------------------
  579|     67|    char *ptr = strchr(str, delim);
  580|     67|    if (ptr != NULL) {
  ------------------
  |  Branch (580:9): [True: 67, False: 0]
  ------------------
  581|     67|      *ptr = 0;
  582|     67|      t = ptr + 1;
  583|     67|    }
  584|     67|  }
  585|     67|  if (head != NULL) {
  ------------------
  |  Branch (585:7): [True: 67, False: 0]
  ------------------
  586|     67|    *head = h;
  587|     67|  }
  588|     67|  if (tail != NULL) {
  ------------------
  |  Branch (588:7): [True: 67, False: 0]
  ------------------
  589|     67|    *tail = t;
  590|     67|  }
  591|     67|} // __kmp_str_split

__kmp_push_current_task_to_thread:
  635|      1|                                       int tid) {
  636|       |  // current task of the thread is a parent of the new just created implicit
  637|       |  // tasks of new team
  638|      1|  KF_TRACE(10, ("__kmp_push_current_task_to_thread(enter): T#%d this_thread=%p "
  639|      1|                "curtask=%p "
  640|      1|                "parent_task=%p\n",
  641|      1|                tid, this_thr, this_thr->th.th_current_task,
  642|      1|                team->t.t_implicit_task_taskdata[tid].td_parent));
  643|       |
  644|      1|  KMP_DEBUG_ASSERT(this_thr != NULL);
  645|       |
  646|      1|  if (tid == 0) {
  ------------------
  |  Branch (646:7): [True: 1, False: 0]
  ------------------
  647|      1|    if (this_thr->th.th_current_task != &team->t.t_implicit_task_taskdata[0]) {
  ------------------
  |  Branch (647:9): [True: 1, False: 0]
  ------------------
  648|      1|      team->t.t_implicit_task_taskdata[0].td_parent =
  649|      1|          this_thr->th.th_current_task;
  650|      1|      this_thr->th.th_current_task = &team->t.t_implicit_task_taskdata[0];
  651|      1|    }
  652|      1|  } else {
  653|      0|    team->t.t_implicit_task_taskdata[tid].td_parent =
  654|      0|        team->t.t_implicit_task_taskdata[0].td_parent;
  655|      0|    this_thr->th.th_current_task = &team->t.t_implicit_task_taskdata[tid];
  656|      0|  }
  657|       |
  658|      1|  KF_TRACE(10, ("__kmp_push_current_task_to_thread(exit): T#%d this_thread=%p "
  659|      1|                "curtask=%p "
  660|      1|                "parent_task=%p\n",
  661|      1|                tid, this_thr, this_thr->th.th_current_task,
  662|      1|                team->t.t_implicit_task_taskdata[tid].td_parent));
  663|      1|}
__kmp_init_implicit_task:
 1320|      4|                              kmp_team_t *team, int tid, int set_curr_task) {
 1321|      4|  kmp_taskdata_t *task = &team->t.t_implicit_task_taskdata[tid];
 1322|       |
 1323|      4|  KF_TRACE(
 1324|      4|      10,
 1325|      4|      ("__kmp_init_implicit_task(enter): T#:%d team=%p task=%p, reinit=%s\n",
 1326|      4|       tid, team, task, set_curr_task ? "TRUE" : "FALSE"));
 1327|       |
 1328|      4|  task->td_task_id = KMP_GEN_TASK_ID();
  ------------------
  |  | 3546|      4|#define KMP_GEN_TASK_ID() _KMP_GEN_ID(__kmp_task_counter)
  |  |  ------------------
  |  |  |  | 3543|      4|#define _KMP_GEN_ID(counter) (~0)
  |  |  ------------------
  ------------------
 1329|      4|  task->td_team = team;
 1330|       |  //    task->td_parent   = NULL;  // fix for CQ230101 (broken parent task info
 1331|       |  //    in debugger)
 1332|      4|  task->td_ident = loc_ref;
 1333|      4|  task->td_taskwait_ident = NULL;
 1334|      4|  task->td_taskwait_counter = 0;
 1335|      4|  task->td_taskwait_thread = 0;
 1336|       |
 1337|      4|  task->td_flags.tiedness = TASK_TIED;
  ------------------
  |  |   45|      4|#define TASK_TIED 1
  ------------------
 1338|      4|  task->td_flags.tasktype = TASK_IMPLICIT;
  ------------------
  |  |   48|      4|#define TASK_IMPLICIT 0
  ------------------
 1339|      4|  task->td_flags.proxy = TASK_FULL;
  ------------------
  |  |   50|      4|#define TASK_FULL 0
  ------------------
 1340|       |
 1341|       |  // All implicit tasks are executed immediately, not deferred
 1342|      4|  task->td_flags.task_serial = 1;
 1343|      4|  task->td_flags.tasking_ser = (__kmp_tasking_mode == tskm_immediate_exec);
 1344|      4|  task->td_flags.team_serial = (team->t.t_serialized) ? 1 : 0;
  ------------------
  |  Branch (1344:32): [True: 4, False: 0]
  ------------------
 1345|       |
 1346|      4|  task->td_flags.started = 1;
 1347|      4|  task->td_flags.executing = 1;
 1348|      4|  task->td_flags.complete = 0;
 1349|      4|  task->td_flags.freed = 0;
 1350|       |#if OMPX_TASKGRAPH
 1351|       |  task->td_flags.onced = 0;
 1352|       |#endif
 1353|       |
 1354|      4|  task->td_depnode = NULL;
 1355|      4|  task->td_last_tied = task;
 1356|      4|  task->td_allow_completion_event.type = KMP_EVENT_UNINITIALIZED;
 1357|       |
 1358|      4|  if (set_curr_task) { // only do this init first time thread is created
  ------------------
  |  Branch (1358:7): [True: 1, False: 3]
  ------------------
 1359|      1|    KMP_ATOMIC_ST_REL(&task->td_incomplete_child_tasks, 0);
  ------------------
  |  | 1251|      1|#define KMP_ATOMIC_ST_REL(p, v) KMP_ATOMIC_OP(store, p, v, release)
  |  |  ------------------
  |  |  |  | 1246|      1|#define KMP_ATOMIC_OP(op, p, v, order) (p)->op(v, std::memory_order_##order)
  |  |  ------------------
  ------------------
 1360|       |    // Not used: don't need to deallocate implicit task
 1361|      1|    KMP_ATOMIC_ST_REL(&task->td_allocated_child_tasks, 0);
  ------------------
  |  | 1251|      1|#define KMP_ATOMIC_ST_REL(p, v) KMP_ATOMIC_OP(store, p, v, release)
  |  |  ------------------
  |  |  |  | 1246|      1|#define KMP_ATOMIC_OP(op, p, v, order) (p)->op(v, std::memory_order_##order)
  |  |  ------------------
  ------------------
 1362|      1|    task->td_taskgroup = NULL; // An implicit task does not have taskgroup
 1363|      1|    task->td_dephash = NULL;
 1364|      1|    __kmp_push_current_task_to_thread(this_thr, team, tid);
 1365|      3|  } else {
 1366|      3|    KMP_DEBUG_ASSERT(task->td_incomplete_child_tasks == 0);
 1367|      3|    KMP_DEBUG_ASSERT(task->td_allocated_child_tasks == 0);
 1368|      3|  }
 1369|       |
 1370|      4|#if OMPT_SUPPORT
 1371|      4|  if (UNLIKELY(ompt_enabled.enabled))
  ------------------
  |  |  119|      4|#define UNLIKELY(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (119:21): [True: 0, False: 4]
  |  |  ------------------
  ------------------
 1372|      0|    __ompt_task_init(task, tid);
 1373|      4|#endif
 1374|       |
 1375|      4|  KF_TRACE(10, ("__kmp_init_implicit_task(exit): T#:%d team=%p task=%p\n", tid,
 1376|      4|                team, task));
 1377|      4|}
__kmp_free_implicit_task:
 1413|      1|void __kmp_free_implicit_task(kmp_info_t *thread) {
 1414|      1|  kmp_taskdata_t *task = thread->th.th_current_task;
 1415|      1|  if (task && task->td_dephash) {
  ------------------
  |  Branch (1415:7): [True: 1, False: 0]
  |  Branch (1415:15): [True: 0, False: 1]
  ------------------
 1416|      0|    __kmp_dephash_free(thread, task->td_dephash);
 1417|       |    task->td_dephash = NULL;
 1418|      0|  }
 1419|      1|}
__kmp_reap_task_teams:
 4014|      1|void __kmp_reap_task_teams(void) {
 4015|      1|  kmp_task_team_t *task_team;
 4016|       |
 4017|      1|  if (TCR_PTR(__kmp_free_task_teams) != NULL) {
  ------------------
  |  | 1156|      1|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      1|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  |  Branch (4017:7): [True: 0, False: 1]
  ------------------
 4018|       |    // Free all task_teams on the free list
 4019|      0|    __kmp_acquire_bootstrap_lock(&__kmp_task_team_lock);
 4020|      0|    while ((task_team = __kmp_free_task_teams) != NULL) {
  ------------------
  |  Branch (4020:12): [True: 0, False: 0]
  ------------------
 4021|      0|      __kmp_free_task_teams = task_team->tt.tt_next;
 4022|      0|      task_team->tt.tt_next = NULL;
 4023|       |
 4024|       |      // Free threads_data if necessary
 4025|      0|      if (task_team->tt.tt_threads_data != NULL) {
  ------------------
  |  Branch (4025:11): [True: 0, False: 0]
  ------------------
 4026|      0|        __kmp_free_task_threads_data(task_team);
 4027|      0|      }
 4028|      0|      if (task_team->tt.tt_task_pri_list != NULL) {
  ------------------
  |  Branch (4028:11): [True: 0, False: 0]
  ------------------
 4029|      0|        __kmp_free_task_pri_list(task_team);
 4030|      0|      }
 4031|      0|      __kmp_free(task_team);
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
 4032|      0|    }
 4033|      0|    __kmp_release_bootstrap_lock(&__kmp_task_team_lock);
 4034|      0|  }
 4035|      1|}
__kmp_wait_to_unref_task_teams:
 4040|      1|void __kmp_wait_to_unref_task_teams(void) {
 4041|      1|  kmp_info_t *thread;
 4042|      1|  kmp_uint32 spins;
 4043|      1|  kmp_uint64 time;
 4044|      1|  int done;
 4045|       |
 4046|      1|  KMP_INIT_YIELD(spins);
  ------------------
  |  | 1514|      1|  { (count) = __kmp_yield_init; }
  ------------------
 4047|      1|  KMP_INIT_BACKOFF(time);
  ------------------
  |  | 1517|      1|  { (time) = __kmp_pause_init; }
  ------------------
 4048|       |
 4049|      1|  for (;;) {
 4050|      1|    done = TRUE;
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 4051|       |
 4052|       |    // TODO: GEH - this may be is wrong because some sync would be necessary
 4053|       |    // in case threads are added to the pool during the traversal. Need to
 4054|       |    // verify that lock for thread pool is held when calling this routine.
 4055|      1|    for (thread = CCAST(kmp_info_t *, __kmp_thread_pool); thread != NULL;
  ------------------
  |  |  229|      1|#define CCAST(type, var) const_cast<type>(var)
  ------------------
  |  Branch (4055:59): [True: 0, False: 1]
  ------------------
 4056|      1|         thread = thread->th.th_next_pool) {
 4057|       |#if KMP_OS_WINDOWS
 4058|       |      DWORD exit_val;
 4059|       |#endif
 4060|      0|      if (TCR_PTR(thread->th.th_task_team) == NULL) {
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  |  Branch (4060:11): [True: 0, False: 0]
  ------------------
 4061|      0|        KA_TRACE(10, ("__kmp_wait_to_unref_task_team: T#%d task_team == NULL\n",
 4062|      0|                      __kmp_gtid_from_thread(thread)));
 4063|      0|        continue;
 4064|      0|      }
 4065|       |#if KMP_OS_WINDOWS
 4066|       |      // TODO: GEH - add this check for Linux* OS / OS X* as well?
 4067|       |      if (!__kmp_is_thread_alive(thread, &exit_val)) {
 4068|       |        thread->th.th_task_team = NULL;
 4069|       |        continue;
 4070|       |      }
 4071|       |#endif
 4072|       |
 4073|      0|      done = FALSE; // Because th_task_team pointer is not NULL for this thread
  ------------------
  |  | 1279|      0|#define FALSE 0
  ------------------
 4074|       |
 4075|      0|      KA_TRACE(10, ("__kmp_wait_to_unref_task_team: Waiting for T#%d to "
 4076|      0|                    "unreference task_team\n",
 4077|      0|                    __kmp_gtid_from_thread(thread)));
 4078|       |
 4079|      0|      if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME) {
  ------------------
  |  | 1184|      0|  (INT_MAX) /* Must be this for "infinite" setting the work */
  ------------------
  |  Branch (4079:11): [True: 0, False: 0]
  ------------------
 4080|      0|        void *sleep_loc;
 4081|       |        // If the thread is sleeping, awaken it.
 4082|      0|        if ((sleep_loc = TCR_PTR(CCAST(void *, thread->th.th_sleep_loc))) !=
  ------------------
  |  | 1156|      0|#define TCR_PTR(a) ((void *)TCR_8(a))
  |  |  ------------------
  |  |  |  | 1131|      0|#define TCR_8(a) (a)
  |  |  ------------------
  ------------------
  |  Branch (4082:13): [True: 0, False: 0]
  ------------------
 4083|      0|            NULL) {
 4084|      0|          KA_TRACE(
 4085|      0|              10,
 4086|      0|              ("__kmp_wait_to_unref_task_team: T#%d waking up thread T#%d\n",
 4087|      0|               __kmp_gtid_from_thread(thread), __kmp_gtid_from_thread(thread)));
 4088|      0|          __kmp_null_resume_wrapper(thread);
 4089|      0|        }
 4090|      0|      }
 4091|      0|    }
 4092|      1|    if (done) {
  ------------------
  |  Branch (4092:9): [True: 1, False: 0]
  ------------------
 4093|      1|      break;
 4094|      1|    }
 4095|       |
 4096|       |    // If oversubscribed or have waited a bit, yield.
 4097|      0|    KMP_YIELD_OVERSUB_ELSE_SPIN(spins, time);
  ------------------
  |  | 1564|      0|  {                                                                            \
  |  | 1565|      0|    if (__kmp_tpause_enabled) {                                                \
  |  |  ------------------
  |  |  |  Branch (1565:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1566|      0|      if (KMP_OVERSUBSCRIBED) {                                                \
  |  |  ------------------
  |  |  |  | 1520|      0|  (TCR_4(__kmp_nth) > (__kmp_avail_proc ? __kmp_avail_proc : __kmp_xproc))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1127|      0|#define TCR_4(a) (a)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:3): [True: 0, False: 0]
  |  |  |  |  |  Branch (1520:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1567|      0|        __kmp_tpause(0, (time));                                               \
  |  | 1568|      0|      } else {                                                                 \
  |  | 1569|      0|        __kmp_tpause(__kmp_tpause_hint, (time));                               \
  |  | 1570|      0|      }                                                                        \
  |  | 1571|      0|      (time) = (time << 1 | 1) & KMP_TPAUSE_MAX_MASK;                          \
  |  |  ------------------
  |  |  |  | 1562|      0|#define KMP_TPAUSE_MAX_MASK ((kmp_uint64)0xFFFF)
  |  |  ------------------
  |  | 1572|      0|    } else {                                                                   \
  |  | 1573|      0|      KMP_CPU_PAUSE();                                                         \
  |  |  ------------------
  |  |  |  | 1498|      0|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  |  |  ------------------
  |  | 1574|      0|      if ((KMP_TRY_YIELD_OVERSUB)) {                                           \
  |  |  ------------------
  |  |  |  | 1526|      0|  ((__kmp_use_yield == 1 || __kmp_use_yield == 2) && (KMP_OVERSUBSCRIBED))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1520|      0|  (TCR_4(__kmp_nth) > (__kmp_avail_proc ? __kmp_avail_proc : __kmp_xproc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1127|      0|#define TCR_4(a) (a)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1520:24): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1526:5): [True: 0, False: 0]
  |  |  |  |  |  Branch (1526:29): [True: 0, False: 0]
  |  |  |  |  |  Branch (1526:54): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1575|      0|        __kmp_yield();                                                         \
  |  | 1576|      0|      } else if (__kmp_use_yield == 1) {                                       \
  |  |  ------------------
  |  |  |  Branch (1576:18): [True: 0, False: 0]
  |  |  ------------------
  |  | 1577|      0|        (count) -= 2;                                                          \
  |  | 1578|      0|        if (!(count)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (1578:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1579|      0|          __kmp_yield();                                                       \
  |  | 1580|      0|          (count) = __kmp_yield_next;                                          \
  |  | 1581|      0|        }                                                                      \
  |  | 1582|      0|      }                                                                        \
  |  | 1583|      0|    }                                                                          \
  |  | 1584|      0|  }
  ------------------
 4098|      0|  }
 4099|      1|}

__kmp_common_initialize:
  129|      1|void __kmp_common_initialize(void) {
  130|      1|  if (!TCR_4(__kmp_init_common)) {
  ------------------
  |  | 1127|      1|#define TCR_4(a) (a)
  ------------------
  |  Branch (130:7): [True: 1, False: 0]
  ------------------
  131|      1|    int q;
  132|       |#ifdef KMP_DEBUG
  133|       |    int gtid;
  134|       |#endif
  135|       |
  136|      1|    __kmp_threadpriv_cache_list = NULL;
  137|       |
  138|       |#ifdef KMP_DEBUG
  139|       |    /* verify the uber masters were initialized */
  140|       |    for (gtid = 0; gtid < __kmp_threads_capacity; gtid++)
  141|       |      if (__kmp_root[gtid]) {
  142|       |        KMP_DEBUG_ASSERT(__kmp_root[gtid]->r.r_uber_thread);
  143|       |        for (q = 0; q < KMP_HASH_TABLE_SIZE; ++q)
  144|       |          KMP_DEBUG_ASSERT(
  145|       |              !__kmp_root[gtid]->r.r_uber_thread->th.th_pri_common->data[q]);
  146|       |        /*                    __kmp_root[ gitd ]-> r.r_uber_thread ->
  147|       |         * th.th_pri_common -> data[ q ] = 0;*/
  148|       |      }
  149|       |#endif /* KMP_DEBUG */
  150|       |
  151|    513|    for (q = 0; q < KMP_HASH_TABLE_SIZE; ++q)
  ------------------
  |  | 1796|    513|  (1 << KMP_HASH_TABLE_LOG2) /* size of the hash table */
  |  |  ------------------
  |  |  |  | 1794|    513|#define KMP_HASH_TABLE_LOG2 9 /* log2 of the hash table size */
  |  |  ------------------
  ------------------
  |  Branch (151:17): [True: 512, False: 1]
  ------------------
  152|    512|      __kmp_threadprivate_d_table.data[q] = 0;
  153|       |
  154|      1|    TCW_4(__kmp_init_common, TRUE);
  ------------------
  |  | 1128|      1|#define TCW_4(a, b) (a) = (b)
  ------------------
  155|      1|  }
  156|      1|}
__kmp_cleanup_threadprivate_caches:
  781|      1|void __kmp_cleanup_threadprivate_caches() {
  782|      1|  kmp_cached_addr_t *ptr = __kmp_threadpriv_cache_list;
  783|       |
  784|      1|  while (ptr) {
  ------------------
  |  Branch (784:10): [True: 0, False: 1]
  ------------------
  785|      0|    void **cache = ptr->addr;
  786|      0|    __kmp_threadpriv_cache_list = ptr->next;
  787|      0|    if (*ptr->compiler_cache)
  ------------------
  |  Branch (787:9): [True: 0, False: 0]
  ------------------
  788|      0|      *ptr->compiler_cache = NULL;
  789|      0|    ptr->compiler_cache = NULL;
  790|      0|    ptr->data = NULL;
  791|      0|    ptr->addr = NULL;
  792|      0|    ptr->next = NULL;
  793|       |    // Threadprivate data pointed at by cache entries are destroyed at end of
  794|       |    // __kmp_launch_thread with __kmp_common_destroy_gtid.
  795|      0|    __kmp_free(cache); // implicitly frees ptr too
  ------------------
  |  | 3619|      0|#define __kmp_free(ptr) ___kmp_free((ptr)KMP_SRC_LOC_CURR)
  ------------------
  796|      0|    ptr = __kmp_threadpriv_cache_list;
  797|      0|  }
  798|      1|}

_Z21__kmp_get_physical_idii:
   35|      1|int __kmp_get_physical_id(int log_per_phy, int apic_id) {
   36|      1|  int index_lsb, index_msb, temp;
   37|       |
   38|      1|  if (log_per_phy > 1) {
  ------------------
  |  Branch (38:7): [True: 1, False: 0]
  ------------------
   39|      1|    index_lsb = 0;
   40|      1|    index_msb = 31;
   41|       |
   42|      1|    temp = log_per_phy;
   43|      6|    while ((temp & 1) == 0) {
  ------------------
  |  Branch (43:12): [True: 5, False: 1]
  ------------------
   44|      5|      temp >>= 1;
   45|      5|      index_lsb++;
   46|      5|    }
   47|       |
   48|      1|    temp = log_per_phy;
   49|     27|    while ((temp & 0x80000000) == 0) {
  ------------------
  |  Branch (49:12): [True: 26, False: 1]
  ------------------
   50|     26|      temp <<= 1;
   51|     26|      index_msb--;
   52|     26|    }
   53|       |
   54|       |    /* If >1 bits were set in log_per_phy, choose next higher power of 2 */
   55|      1|    if (index_lsb != index_msb)
  ------------------
  |  Branch (55:9): [True: 0, False: 1]
  ------------------
   56|      0|      index_msb++;
   57|       |
   58|      1|    return ((int)(apic_id >> index_msb));
   59|      1|  }
   60|       |
   61|      0|  return apic_id;
   62|      1|}
_Z20__kmp_get_logical_idii:
   69|      1|int __kmp_get_logical_id(int log_per_phy, int apic_id) {
   70|      1|  unsigned current_bit;
   71|      1|  int bits_seen;
   72|       |
   73|      1|  if (log_per_phy <= 1)
  ------------------
  |  Branch (73:7): [True: 0, False: 1]
  ------------------
   74|      0|    return (0);
   75|       |
   76|      1|  bits_seen = 0;
   77|       |
   78|      7|  for (current_bit = 1; log_per_phy != 0; current_bit <<= 1) {
  ------------------
  |  Branch (78:25): [True: 6, False: 1]
  ------------------
   79|      6|    if (log_per_phy & current_bit) {
  ------------------
  |  Branch (79:9): [True: 1, False: 5]
  ------------------
   80|      1|      log_per_phy &= ~current_bit;
   81|      1|      bits_seen++;
   82|      1|    }
   83|      6|  }
   84|       |
   85|       |  /* If exactly 1 bit was set in log_per_phy, choose next lower power of 2 */
   86|      1|  if (bits_seen == 1) {
  ------------------
  |  Branch (86:7): [True: 1, False: 0]
  ------------------
   87|      1|    current_bit >>= 1;
   88|      1|  }
   89|       |
   90|      1|  return ((int)((current_bit - 1) & apic_id));
   91|      1|}
__kmp_query_cpuid:
  122|      1|void __kmp_query_cpuid(kmp_cpuinfo_t *p) {
  123|      1|  struct kmp_cpuid buf;
  124|      1|  int max_arg;
  125|      1|  int log_per_phy;
  126|       |#ifdef KMP_DEBUG
  127|       |  int cflush_size;
  128|       |#endif
  129|       |
  130|      1|  p->initialized = 1;
  131|       |
  132|      1|  p->flags.sse2 = 1; // Assume SSE2 by default.
  133|       |
  134|      1|  __kmp_x86_cpuid(0, 0, &buf);
  135|       |
  136|      1|  KA_TRACE(trace_level,
  137|      1|           ("INFO: CPUID %d: EAX=0x%08X EBX=0x%08X ECX=0x%08X EDX=0x%08X\n", 0,
  138|      1|            buf.eax, buf.ebx, buf.ecx, buf.edx));
  139|       |
  140|      1|  max_arg = buf.eax;
  141|       |
  142|      1|  p->apic_id = -1;
  143|       |
  144|      1|  if (max_arg >= 1) {
  ------------------
  |  Branch (144:7): [True: 1, False: 0]
  ------------------
  145|      1|    int i;
  146|      1|    kmp_uint32 t, data[4];
  147|       |
  148|      1|    __kmp_x86_cpuid(1, 0, &buf);
  149|      1|    KA_TRACE(trace_level,
  150|      1|             ("INFO: CPUID %d: EAX=0x%08X EBX=0x%08X ECX=0x%08X EDX=0x%08X\n",
  151|      1|              1, buf.eax, buf.ebx, buf.ecx, buf.edx));
  152|       |
  153|      1|    {
  154|      1|#define get_value(reg, lo, mask) (((reg) >> (lo)) & (mask))
  155|       |
  156|      1|      p->signature = buf.eax;
  157|      1|      p->family = get_value(buf.eax, 20, 0xff) + get_value(buf.eax, 8, 0x0f);
  ------------------
  |  |  154|      1|#define get_value(reg, lo, mask) (((reg) >> (lo)) & (mask))
  ------------------
                    p->family = get_value(buf.eax, 20, 0xff) + get_value(buf.eax, 8, 0x0f);
  ------------------
  |  |  154|      1|#define get_value(reg, lo, mask) (((reg) >> (lo)) & (mask))
  ------------------
  158|      1|      p->model =
  159|      1|          (get_value(buf.eax, 16, 0x0f) << 4) + get_value(buf.eax, 4, 0x0f);
  ------------------
  |  |  154|      1|#define get_value(reg, lo, mask) (((reg) >> (lo)) & (mask))
  ------------------
                        (get_value(buf.eax, 16, 0x0f) << 4) + get_value(buf.eax, 4, 0x0f);
  ------------------
  |  |  154|      1|#define get_value(reg, lo, mask) (((reg) >> (lo)) & (mask))
  ------------------
  160|      1|      p->stepping = get_value(buf.eax, 0, 0x0f);
  ------------------
  |  |  154|      1|#define get_value(reg, lo, mask) (((reg) >> (lo)) & (mask))
  ------------------
  161|       |
  162|      1|#undef get_value
  163|       |
  164|      1|      KA_TRACE(trace_level, (" family = %d, model = %d, stepping = %d\n",
  165|      1|                             p->family, p->model, p->stepping));
  166|      1|    }
  167|       |
  168|      5|    for (t = buf.ebx, i = 0; i < 4; t >>= 8, ++i) {
  ------------------
  |  Branch (168:30): [True: 4, False: 1]
  ------------------
  169|      4|      data[i] = (t & 0xff);
  170|      4|    }
  171|       |
  172|      1|    p->flags.sse2 = (buf.edx >> 26) & 1;
  173|       |
  174|       |#ifdef KMP_DEBUG
  175|       |
  176|       |    if ((buf.edx >> 4) & 1) {
  177|       |      /* TSC - Timestamp Counter Available */
  178|       |      KA_TRACE(trace_level, (" TSC"));
  179|       |    }
  180|       |    if ((buf.edx >> 8) & 1) {
  181|       |      /* CX8 - CMPXCHG8B Instruction Available */
  182|       |      KA_TRACE(trace_level, (" CX8"));
  183|       |    }
  184|       |    if ((buf.edx >> 9) & 1) {
  185|       |      /* APIC - Local APIC Present (multi-processor operation support */
  186|       |      KA_TRACE(trace_level, (" APIC"));
  187|       |    }
  188|       |    if ((buf.edx >> 15) & 1) {
  189|       |      /* CMOV - Conditional MOVe Instruction Available */
  190|       |      KA_TRACE(trace_level, (" CMOV"));
  191|       |    }
  192|       |    if ((buf.edx >> 18) & 1) {
  193|       |      /* PSN - Processor Serial Number Available */
  194|       |      KA_TRACE(trace_level, (" PSN"));
  195|       |    }
  196|       |    if ((buf.edx >> 19) & 1) {
  197|       |      /* CLFLUSH - Cache Flush Instruction Available */
  198|       |      cflush_size =
  199|       |          data[1] * 8; /* Bits 15-08: CLFLUSH line size = 8 (64 bytes) */
  200|       |      KA_TRACE(trace_level, (" CLFLUSH(%db)", cflush_size));
  201|       |    }
  202|       |    if ((buf.edx >> 21) & 1) {
  203|       |      /* DTES - Debug Trace & EMON Store */
  204|       |      KA_TRACE(trace_level, (" DTES"));
  205|       |    }
  206|       |    if ((buf.edx >> 22) & 1) {
  207|       |      /* ACPI - ACPI Support Available */
  208|       |      KA_TRACE(trace_level, (" ACPI"));
  209|       |    }
  210|       |    if ((buf.edx >> 23) & 1) {
  211|       |      /* MMX - Multimedia Extensions */
  212|       |      KA_TRACE(trace_level, (" MMX"));
  213|       |    }
  214|       |    if ((buf.edx >> 25) & 1) {
  215|       |      /* SSE - SSE Instructions */
  216|       |      KA_TRACE(trace_level, (" SSE"));
  217|       |    }
  218|       |    if ((buf.edx >> 26) & 1) {
  219|       |      /* SSE2 - SSE2 Instructions */
  220|       |      KA_TRACE(trace_level, (" SSE2"));
  221|       |    }
  222|       |    if ((buf.edx >> 27) & 1) {
  223|       |      /* SLFSNP - Self-Snooping Cache */
  224|       |      KA_TRACE(trace_level, (" SLFSNP"));
  225|       |    }
  226|       |#endif /* KMP_DEBUG */
  227|       |
  228|      1|    if ((buf.edx >> 28) & 1) {
  ------------------
  |  Branch (228:9): [True: 1, False: 0]
  ------------------
  229|       |      /* Bits 23-16: Logical Processors per Physical Processor (1 for P4) */
  230|      1|      log_per_phy = data[2];
  231|      1|      p->apic_id = data[3]; /* Bits 31-24: Processor Initial APIC ID (X) */
  232|      1|      KA_TRACE(trace_level, (" HT(%d TPUs)", log_per_phy));
  233|      1|      p->physical_id = __kmp_get_physical_id(log_per_phy, p->apic_id);
  234|      1|      p->logical_id = __kmp_get_logical_id(log_per_phy, p->apic_id);
  235|      1|    }
  236|       |#ifdef KMP_DEBUG
  237|       |    if ((buf.edx >> 29) & 1) {
  238|       |      /* ATHROTL - Automatic Throttle Control */
  239|       |      KA_TRACE(trace_level, (" ATHROTL"));
  240|       |    }
  241|       |    KA_TRACE(trace_level, (" ]\n"));
  242|       |
  243|       |    for (i = 2; i <= max_arg; ++i) {
  244|       |      __kmp_x86_cpuid(i, 0, &buf);
  245|       |      KA_TRACE(trace_level,
  246|       |               ("INFO: CPUID %d: EAX=0x%08X EBX=0x%08X ECX=0x%08X EDX=0x%08X\n",
  247|       |                i, buf.eax, buf.ebx, buf.ecx, buf.edx));
  248|       |    }
  249|       |#endif
  250|      1|    p->flags.rtm = 0;
  251|      1|    p->flags.hybrid = 0;
  252|      1|    if (max_arg > 7) {
  ------------------
  |  Branch (252:9): [True: 1, False: 0]
  ------------------
  253|       |      /* RTM bit CPUID.07:EBX, bit 11 */
  254|       |      /* HYRBID bit CPUID.07:EDX, bit 15 */
  255|      1|      __kmp_x86_cpuid(7, 0, &buf);
  256|      1|      p->flags.rtm = (buf.ebx >> 11) & 1;
  257|      1|      p->flags.hybrid = (buf.edx >> 15) & 1;
  258|      1|      if (p->flags.rtm) {
  ------------------
  |  Branch (258:11): [True: 0, False: 1]
  ------------------
  259|      0|        KA_TRACE(trace_level, (" RTM"));
  260|      0|      }
  261|      1|      if (p->flags.hybrid) {
  ------------------
  |  Branch (261:11): [True: 0, False: 1]
  ------------------
  262|      0|        KA_TRACE(trace_level, (" HYBRID"));
  263|      0|      }
  264|      1|    }
  265|      1|  }
  266|       |
  267|      1|  { // Parse CPU brand string for frequency, saving the string for later.
  268|      1|    int i;
  269|      1|    kmp_cpuid_t *base = (kmp_cpuid_t *)&p->name[0];
  270|       |
  271|       |    // Get CPU brand string.
  272|      4|    for (i = 0; i < 3; ++i) {
  ------------------
  |  Branch (272:17): [True: 3, False: 1]
  ------------------
  273|      3|      __kmp_x86_cpuid(0x80000002 + i, 0, base + i);
  274|      3|    }
  275|      1|    p->name[sizeof(p->name) - 1] = 0; // Just in case. ;-)
  276|      1|    KA_TRACE(trace_level, ("cpu brand string: \"%s\"\n", &p->name[0]));
  277|       |
  278|       |    // Parse frequency.
  279|      1|    p->frequency = __kmp_parse_frequency(strrchr(&p->name[0], ' '));
  280|      1|    KA_TRACE(trace_level,
  281|      1|             ("cpu frequency from brand string: %" KMP_UINT64_SPEC "\n",
  282|      1|              p->frequency));
  283|      1|  }
  284|      1|}
kmp_utility.cpp:_ZL21__kmp_parse_frequencyPKc:
   95|      1|) {
   96|       |
   97|      1|  double value = 0.0;
   98|      1|  char *unit = NULL;
   99|      1|  kmp_uint64 result = 0; /* Zero is a better unknown value than all ones. */
  100|       |
  101|      1|  if (frequency == NULL) {
  ------------------
  |  Branch (101:7): [True: 0, False: 1]
  ------------------
  102|      0|    return result;
  103|      0|  }
  104|      1|  value = strtod(frequency, &unit);
  105|      1|  if (0 < value &&
  ------------------
  |  Branch (105:7): [True: 1, False: 0]
  ------------------
  106|      1|      value <= DBL_MAX) { // Good value (not overflow, underflow, etc).
  ------------------
  |  Branch (106:7): [True: 1, False: 0]
  ------------------
  107|      1|    if (strcmp(unit, "MHz") == 0) {
  ------------------
  |  Branch (107:9): [True: 0, False: 1]
  ------------------
  108|      0|      value = value * 1.0E+6;
  109|      1|    } else if (strcmp(unit, "GHz") == 0) {
  ------------------
  |  Branch (109:16): [True: 0, False: 1]
  ------------------
  110|      0|      value = value * 1.0E+9;
  111|      1|    } else if (strcmp(unit, "THz") == 0) {
  ------------------
  |  Branch (111:16): [True: 0, False: 1]
  ------------------
  112|      0|      value = value * 1.0E+12;
  113|      1|    } else { // Wrong unit.
  114|      1|      return result;
  115|      1|    }
  116|      0|    result = (kmp_uint64)value; // rounds down
  117|      0|  }
  118|      0|  return result;
  119|       |
  120|      1|} // func __kmp_parse_cpu_frequency

_Z9ompd_initv:
   43|      1|void ompd_init() {
   44|       |
   45|      1|  static int ompd_initialized = 0;
   46|       |
   47|      1|  if (ompd_initialized)
  ------------------
  |  Branch (47:7): [True: 0, False: 1]
  ------------------
   48|      0|    return;
   49|       |
   50|       |    /**
   51|       |     * Calculate member offsets for structs and unions
   52|       |     */
   53|       |
   54|      1|#define ompd_init_access(t, m)                                                 \
   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  ------------------
  |  |   38|      1|  OMPD_ACCESS(kmp_base_info_t, th_current_task)                                \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   39|      1|  OMPD_ACCESS(kmp_base_info_t, th_team)                                        \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   40|      1|  OMPD_ACCESS(kmp_base_info_t, th_info)                                        \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   41|      1|  OMPD_ACCESS(kmp_base_info_t, ompt_thread_info)                               \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   42|      1|                                                                               \
  |  |   43|      1|  OMPD_ACCESS(kmp_base_root_t, r_in_parallel)                                  \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   44|      1|                                                                               \
  |  |   45|      1|  OMPD_ACCESS(kmp_base_team_t, ompt_team_info)                                 \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      1|  OMPD_ACCESS(kmp_base_team_t, ompt_serialized_team_info)                      \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      1|  OMPD_ACCESS(kmp_base_team_t, t_active_level)                                 \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   48|      1|  OMPD_ACCESS(kmp_base_team_t, t_implicit_task_taskdata)                       \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   49|      1|  OMPD_ACCESS(kmp_base_team_t, t_master_tid)                                   \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   50|      1|  OMPD_ACCESS(kmp_base_team_t, t_nproc)                                        \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   51|      1|  OMPD_ACCESS(kmp_base_team_t, t_level)                                        \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      1|  OMPD_ACCESS(kmp_base_team_t, t_parent)                                       \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|      1|  OMPD_ACCESS(kmp_base_team_t, t_pkfn)                                         \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      1|  OMPD_ACCESS(kmp_base_team_t, t_threads)                                      \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   55|      1|                                                                               \
  |  |   56|      1|  OMPD_ACCESS(kmp_desc_t, ds)                                                  \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   57|      1|                                                                               \
  |  |   58|      1|  OMPD_ACCESS(kmp_desc_base_t, ds_thread)                                      \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|      1|  OMPD_ACCESS(kmp_desc_base_t, ds_tid)                                         \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      1|                                                                               \
  |  |   61|      1|  OMPD_ACCESS(kmp_info_t, th)                                                  \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      1|                                                                               \
  |  |   63|      1|  OMPD_ACCESS(kmp_r_sched_t, r_sched_type)                                     \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   64|      1|  OMPD_ACCESS(kmp_r_sched_t, chunk)                                            \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   65|      1|                                                                               \
  |  |   66|      1|  OMPD_ACCESS(kmp_root_t, r)                                                   \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|      1|                                                                               \
  |  |   68|      1|  OMPD_ACCESS(kmp_internal_control_t, dynamic)                                 \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   69|      1|  OMPD_ACCESS(kmp_internal_control_t, max_active_levels)                       \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|      1|  OMPD_ACCESS(kmp_internal_control_t, nproc)                                   \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   71|      1|  OMPD_ACCESS(kmp_internal_control_t, proc_bind)                               \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   72|      1|  OMPD_ACCESS(kmp_internal_control_t, sched)                                   \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|      1|  OMPD_ACCESS(kmp_internal_control_t, default_device)                          \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      1|  OMPD_ACCESS(kmp_internal_control_t, thread_limit)                            \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   75|      1|                                                                               \
  |  |   76|      1|  OMPD_ACCESS(kmp_taskdata_t, ompt_task_info)                                  \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      1|  OMPD_ACCESS(kmp_taskdata_t, td_flags)                                        \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   78|      1|  OMPD_ACCESS(kmp_taskdata_t, td_icvs)                                         \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   79|      1|  OMPD_ACCESS(kmp_taskdata_t, td_parent)                                       \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      1|  OMPD_ACCESS(kmp_taskdata_t, td_team)                                         \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|      1|                                                                               \
  |  |   82|      1|  OMPD_ACCESS(kmp_task_t, routine)                                             \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   83|      1|                                                                               \
  |  |   84|      1|  OMPD_ACCESS(kmp_team_p, t)                                                   \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|      1|                                                                               \
  |  |   86|      1|  OMPD_ACCESS(kmp_nested_nthreads_t, used)                                     \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   87|      1|  OMPD_ACCESS(kmp_nested_nthreads_t, nth)                                      \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|      1|                                                                               \
  |  |   89|      1|  OMPD_ACCESS(kmp_nested_proc_bind_t, used)                                    \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      1|  OMPD_ACCESS(kmp_nested_proc_bind_t, bind_types)                              \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|      1|                                                                               \
  |  |   92|      1|  OMPD_ACCESS(ompt_task_info_t, frame)                                         \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      1|  OMPD_ACCESS(ompt_task_info_t, scheduling_parent)                             \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|      1|  OMPD_ACCESS(ompt_task_info_t, task_data)                                     \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|      1|                                                                               \
  |  |   96|      1|  OMPD_ACCESS(ompt_team_info_t, parallel_data)                                 \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|      1|                                                                               \
  |  |   98|      1|  OMPD_ACCESS(ompt_thread_info_t, state)                                       \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   99|      1|  OMPD_ACCESS(ompt_thread_info_t, wait_id)                                     \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  100|      1|  OMPD_ACCESS(ompt_thread_info_t, thread_data)                                 \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  101|      1|                                                                               \
  |  |  102|      1|  OMPD_ACCESS(ompt_data_t, value)                                              \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      1|  OMPD_ACCESS(ompt_data_t, ptr)                                                \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      1|                                                                               \
  |  |  105|      1|  OMPD_ACCESS(ompt_frame_t, exit_frame)                                        \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  106|      1|  OMPD_ACCESS(ompt_frame_t, enter_frame)                                       \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  107|      1|                                                                               \
  |  |  108|      1|  OMPD_ACCESS(ompt_lw_taskteam_t, parent)                                      \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  109|      1|  OMPD_ACCESS(ompt_lw_taskteam_t, ompt_team_info)                              \
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      1|  OMPD_ACCESS(ompt_lw_taskteam_t, ompt_task_info)
  |  |  ------------------
  |  |  |  |   56|      1|  OMPD_FOREACH_ACCESS(ompd_init_access)
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|  ompd_access__##t##__##m = (uint64_t) & (((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   57|      1|#undef ompd_init_access
   58|       |
   59|       |  /**
   60|       |   * Create bit mask for bitfield access
   61|       |   */
   62|       |
   63|      1|#define ompd_init_bitfield(t, m)                                               \
   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  ------------------
  |  |  113|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, final)                                    \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, tiedness)                                 \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, tasktype)                                 \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  116|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, task_serial)                              \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, tasking_ser)                              \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  118|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, team_serial)                              \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  119|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, started)                                  \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, executing)                                \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  121|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, complete)                                 \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  122|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, freed)                                    \
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  123|      1|  OMPD_BITFIELD(kmp_tasking_flags_t, native)
  |  |  ------------------
  |  |  |  |   66|      1|  OMPD_FOREACH_BITFIELD(ompd_init_bitfield)
  |  |  |  |  ------------------
  |  |  |  |  |  |   64|      1|  ompd_bitfield__##t##__##m = 0;                                               \
  |  |  |  |  |  |   65|      1|  ((t *)(&ompd_bitfield__##t##__##m))->m = 1;
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   67|      1|#undef ompd_init_bitfield
   68|       |
   69|       |  /**
   70|       |   * Calculate type size information
   71|       |   */
   72|       |
   73|      1|#define ompd_init_sizeof_member(t, m)                                          \
   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  ------------------
  |  |   38|      1|  OMPD_ACCESS(kmp_base_info_t, th_current_task)                                \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   39|      1|  OMPD_ACCESS(kmp_base_info_t, th_team)                                        \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   40|      1|  OMPD_ACCESS(kmp_base_info_t, th_info)                                        \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   41|      1|  OMPD_ACCESS(kmp_base_info_t, ompt_thread_info)                               \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   42|      1|                                                                               \
  |  |   43|      1|  OMPD_ACCESS(kmp_base_root_t, r_in_parallel)                                  \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   44|      1|                                                                               \
  |  |   45|      1|  OMPD_ACCESS(kmp_base_team_t, ompt_team_info)                                 \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      1|  OMPD_ACCESS(kmp_base_team_t, ompt_serialized_team_info)                      \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      1|  OMPD_ACCESS(kmp_base_team_t, t_active_level)                                 \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   48|      1|  OMPD_ACCESS(kmp_base_team_t, t_implicit_task_taskdata)                       \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   49|      1|  OMPD_ACCESS(kmp_base_team_t, t_master_tid)                                   \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   50|      1|  OMPD_ACCESS(kmp_base_team_t, t_nproc)                                        \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   51|      1|  OMPD_ACCESS(kmp_base_team_t, t_level)                                        \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      1|  OMPD_ACCESS(kmp_base_team_t, t_parent)                                       \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|      1|  OMPD_ACCESS(kmp_base_team_t, t_pkfn)                                         \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      1|  OMPD_ACCESS(kmp_base_team_t, t_threads)                                      \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   55|      1|                                                                               \
  |  |   56|      1|  OMPD_ACCESS(kmp_desc_t, ds)                                                  \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   57|      1|                                                                               \
  |  |   58|      1|  OMPD_ACCESS(kmp_desc_base_t, ds_thread)                                      \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|      1|  OMPD_ACCESS(kmp_desc_base_t, ds_tid)                                         \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      1|                                                                               \
  |  |   61|      1|  OMPD_ACCESS(kmp_info_t, th)                                                  \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      1|                                                                               \
  |  |   63|      1|  OMPD_ACCESS(kmp_r_sched_t, r_sched_type)                                     \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   64|      1|  OMPD_ACCESS(kmp_r_sched_t, chunk)                                            \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   65|      1|                                                                               \
  |  |   66|      1|  OMPD_ACCESS(kmp_root_t, r)                                                   \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|      1|                                                                               \
  |  |   68|      1|  OMPD_ACCESS(kmp_internal_control_t, dynamic)                                 \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   69|      1|  OMPD_ACCESS(kmp_internal_control_t, max_active_levels)                       \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|      1|  OMPD_ACCESS(kmp_internal_control_t, nproc)                                   \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   71|      1|  OMPD_ACCESS(kmp_internal_control_t, proc_bind)                               \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   72|      1|  OMPD_ACCESS(kmp_internal_control_t, sched)                                   \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|      1|  OMPD_ACCESS(kmp_internal_control_t, default_device)                          \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      1|  OMPD_ACCESS(kmp_internal_control_t, thread_limit)                            \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   75|      1|                                                                               \
  |  |   76|      1|  OMPD_ACCESS(kmp_taskdata_t, ompt_task_info)                                  \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      1|  OMPD_ACCESS(kmp_taskdata_t, td_flags)                                        \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   78|      1|  OMPD_ACCESS(kmp_taskdata_t, td_icvs)                                         \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   79|      1|  OMPD_ACCESS(kmp_taskdata_t, td_parent)                                       \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|      1|  OMPD_ACCESS(kmp_taskdata_t, td_team)                                         \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|      1|                                                                               \
  |  |   82|      1|  OMPD_ACCESS(kmp_task_t, routine)                                             \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   83|      1|                                                                               \
  |  |   84|      1|  OMPD_ACCESS(kmp_team_p, t)                                                   \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|      1|                                                                               \
  |  |   86|      1|  OMPD_ACCESS(kmp_nested_nthreads_t, used)                                     \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   87|      1|  OMPD_ACCESS(kmp_nested_nthreads_t, nth)                                      \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|      1|                                                                               \
  |  |   89|      1|  OMPD_ACCESS(kmp_nested_proc_bind_t, used)                                    \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      1|  OMPD_ACCESS(kmp_nested_proc_bind_t, bind_types)                              \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|      1|                                                                               \
  |  |   92|      1|  OMPD_ACCESS(ompt_task_info_t, frame)                                         \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      1|  OMPD_ACCESS(ompt_task_info_t, scheduling_parent)                             \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|      1|  OMPD_ACCESS(ompt_task_info_t, task_data)                                     \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|      1|                                                                               \
  |  |   96|      1|  OMPD_ACCESS(ompt_team_info_t, parallel_data)                                 \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|      1|                                                                               \
  |  |   98|      1|  OMPD_ACCESS(ompt_thread_info_t, state)                                       \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   99|      1|  OMPD_ACCESS(ompt_thread_info_t, wait_id)                                     \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  100|      1|  OMPD_ACCESS(ompt_thread_info_t, thread_data)                                 \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  101|      1|                                                                               \
  |  |  102|      1|  OMPD_ACCESS(ompt_data_t, value)                                              \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      1|  OMPD_ACCESS(ompt_data_t, ptr)                                                \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      1|                                                                               \
  |  |  105|      1|  OMPD_ACCESS(ompt_frame_t, exit_frame)                                        \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  106|      1|  OMPD_ACCESS(ompt_frame_t, enter_frame)                                       \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  107|      1|                                                                               \
  |  |  108|      1|  OMPD_ACCESS(ompt_lw_taskteam_t, parent)                                      \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  109|      1|  OMPD_ACCESS(ompt_lw_taskteam_t, ompt_team_info)                              \
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      1|  OMPD_ACCESS(ompt_lw_taskteam_t, ompt_task_info)
  |  |  ------------------
  |  |  |  |   75|      1|  OMPD_FOREACH_ACCESS(ompd_init_sizeof_member)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      1|  ompd_sizeof__##t##__##m = sizeof(((t *)0)->m);
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   76|      1|#undef ompd_init_sizeof_member
   77|       |
   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  ------------------
  |  |  126|      1|  OMPD_SIZEOF(kmp_info_t)                                                      \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  127|      1|  OMPD_SIZEOF(kmp_taskdata_t)                                                  \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  128|      1|  OMPD_SIZEOF(kmp_task_t)                                                      \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  129|      1|  OMPD_SIZEOF(kmp_tasking_flags_t)                                             \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  130|      1|  OMPD_SIZEOF(kmp_thread_t)                                                    \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  131|      1|  OMPD_SIZEOF(ompt_data_t)                                                     \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|      1|  OMPD_SIZEOF(ompt_id_t)                                                       \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  133|      1|  OMPD_SIZEOF(__kmp_avail_proc)                                                \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      1|  OMPD_SIZEOF(__kmp_max_nth)                                                   \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  135|      1|  OMPD_SIZEOF(__kmp_stksize)                                                   \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  136|      1|  OMPD_SIZEOF(__kmp_omp_cancellation)                                          \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  137|      1|  OMPD_SIZEOF(__kmp_max_task_priority)                                         \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  138|      1|  OMPD_SIZEOF(__kmp_display_affinity)                                          \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  139|      1|  OMPD_SIZEOF(__kmp_affinity_format)                                           \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  140|      1|  OMPD_SIZEOF(__kmp_tool_libraries)                                            \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  141|      1|  OMPD_SIZEOF(__kmp_tool_verbose_init)                                         \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  142|      1|  OMPD_SIZEOF(__kmp_tool)                                                      \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  143|      1|  OMPD_SIZEOF(ompd_state)                                                      \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  144|      1|  OMPD_SIZEOF(kmp_nested_nthreads_t)                                           \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|  OMPD_SIZEOF(__kmp_nested_nth)                                                \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  146|      1|  OMPD_SIZEOF(kmp_nested_proc_bind_t)                                          \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  147|      1|  OMPD_SIZEOF(__kmp_nested_proc_bind)                                          \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|      1|  OMPD_SIZEOF(int)                                                             \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  149|      1|  OMPD_SIZEOF(char)                                                            \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      1|  OMPD_SIZEOF(__kmp_gtid)                                                      \
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  151|      1|  OMPD_SIZEOF(__kmp_nth)
  |  |  ------------------
  |  |  |  |   79|      1|  OMPD_FOREACH_SIZEOF(ompd_init_sizeof)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|      1|#define ompd_init_sizeof(t) ompd_sizeof__##t = sizeof(t);
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|      1|#undef ompd_init_sizeof
   81|       |
   82|      1|  char *libname = NULL;
   83|       |
   84|      1|#if KMP_OS_UNIX
   85|       |  // Find the location of libomp.so thru dladdr and replace the libomp with
   86|       |  // libompd to get the full path of libompd
   87|      1|  Dl_info dl_info;
   88|      1|  int ret = dladdr((void *)ompd_init, &dl_info);
   89|      1|  if (!ret) {
  ------------------
  |  Branch (89:7): [True: 0, False: 1]
  ------------------
   90|      0|    fprintf(stderr, "%s\n", dlerror());
   91|      0|  }
   92|      1|  int lib_path_length;
   93|      1|  if (strrchr(dl_info.dli_fname, '/')) {
  ------------------
  |  Branch (93:7): [True: 1, False: 0]
  ------------------
   94|      1|    lib_path_length = strrchr(dl_info.dli_fname, '/') - dl_info.dli_fname;
   95|      1|    libname =
   96|      1|        (char *)malloc(lib_path_length + 12 /*for '/libompd.so' and '\0'*/);
   97|      1|    strncpy(libname, dl_info.dli_fname, lib_path_length);
   98|      1|    memcpy(libname + lib_path_length, "/libompd.so\0", 12);
   99|      1|  }
  100|      1|#endif
  101|       |
  102|      1|  const char *ompd_env_var = getenv("OMP_DEBUG");
  103|      1|  if (ompd_env_var && !strcmp(ompd_env_var, "enabled")) {
  ------------------
  |  Branch (103:7): [True: 0, False: 1]
  |  Branch (103:23): [True: 0, False: 0]
  ------------------
  104|      0|    fprintf(stderr, "OMP_OMPD active\n");
  105|      0|    ompt_enabled.enabled = 1;
  106|      0|    ompd_state |= OMPD_ENABLE_BP;
  ------------------
  |  |   35|      0|#define OMPD_ENABLE_BP 0x1
  ------------------
  107|      0|  }
  108|       |
  109|      1|  ompd_initialized = 1;
  110|      1|  ompd_dll_locations = (volatile const char **)malloc(3 * sizeof(const char *));
  111|      1|  ompd_dll_locations[0] = "libompd.so";
  112|      1|  ompd_dll_locations[1] = libname;
  113|       |  ompd_dll_locations[2] = NULL;
  114|      1|  ompd_dll_locations_valid();
  115|      1|}
_Z24ompd_dll_locations_validv:
  117|      1|void __attribute__((noinline)) ompd_dll_locations_valid(void) {
  118|       |  /* naive way of implementing hard to opt-out empty function
  119|       |     we might want to use a separate object file? */
  120|      1|  asm("");
  121|      1|}

ompt_start_tool:
  161|      1|ompt_start_tool(unsigned int omp_version, const char *runtime_version) {
  162|      1|  ompt_start_tool_result_t *ret = NULL;
  163|       |  // Search next symbol in the current address space. This can happen if the
  164|       |  // runtime library is linked before the tool. Since glibc 2.2 strong symbols
  165|       |  // don't override weak symbols that have been found before unless the user
  166|       |  // sets the environment variable LD_DYNAMIC_WEAK.
  167|      1|  ompt_start_tool_t next_tool =
  168|      1|      (ompt_start_tool_t)dlsym(RTLD_NEXT, "ompt_start_tool");
  169|      1|  if (next_tool) {
  ------------------
  |  Branch (169:7): [True: 0, False: 1]
  ------------------
  170|      0|    ret = next_tool(omp_version, runtime_version);
  171|      0|  }
  172|      1|  return ret;
  173|      1|}
ompt_pre_init:
  392|      1|void ompt_pre_init() {
  393|       |  //--------------------------------------------------
  394|       |  // Execute the pre-initialization logic only once.
  395|       |  //--------------------------------------------------
  396|      1|  static int ompt_pre_initialized = 0;
  397|       |
  398|      1|  if (ompt_pre_initialized)
  ------------------
  |  Branch (398:7): [True: 0, False: 1]
  ------------------
  399|      0|    return;
  400|       |
  401|      1|  ompt_pre_initialized = 1;
  402|       |
  403|       |  //--------------------------------------------------
  404|       |  // Use a tool iff a tool is enabled and available.
  405|       |  //--------------------------------------------------
  406|      1|  const char *ompt_env_var = getenv("OMP_TOOL");
  407|      1|  tool_setting_e tool_setting = omp_tool_error;
  408|       |
  409|      1|  if (!ompt_env_var || !strcmp(ompt_env_var, ""))
  ------------------
  |  Branch (409:7): [True: 1, False: 0]
  |  Branch (409:24): [True: 0, False: 0]
  ------------------
  410|      1|    tool_setting = omp_tool_unset;
  411|      0|  else if (OMPT_STR_MATCH(ompt_env_var, "disabled"))
  ------------------
  |  |   77|      0|#define OMPT_STR_MATCH(haystack, needle) __kmp_str_match(haystack, 0, needle)
  |  |  ------------------
  |  |  |  Branch (77:42): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  412|      0|    tool_setting = omp_tool_disabled;
  413|      0|  else if (OMPT_STR_MATCH(ompt_env_var, "enabled"))
  ------------------
  |  |   77|      0|#define OMPT_STR_MATCH(haystack, needle) __kmp_str_match(haystack, 0, needle)
  |  |  ------------------
  |  |  |  Branch (77:42): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  414|      0|    tool_setting = omp_tool_enabled;
  415|       |
  416|      1|  const char *ompt_env_verbose_init = getenv("OMP_TOOL_VERBOSE_INIT");
  417|       |  // possible options: disabled | stdout | stderr | <filename>
  418|       |  // if set, not empty and not disabled -> prepare for logging
  419|      1|  if (ompt_env_verbose_init && strcmp(ompt_env_verbose_init, "") &&
  ------------------
  |  Branch (419:7): [True: 0, False: 1]
  |  Branch (419:32): [True: 0, False: 0]
  ------------------
  420|      0|      !OMPT_STR_MATCH(ompt_env_verbose_init, "disabled")) {
  ------------------
  |  |   77|      0|#define OMPT_STR_MATCH(haystack, needle) __kmp_str_match(haystack, 0, needle)
  ------------------
  |  Branch (420:7): [True: 0, False: 0]
  ------------------
  421|      0|    verbose_init = 1;
  422|      0|    if (OMPT_STR_MATCH(ompt_env_verbose_init, "STDERR"))
  ------------------
  |  |   77|      0|#define OMPT_STR_MATCH(haystack, needle) __kmp_str_match(haystack, 0, needle)
  |  |  ------------------
  |  |  |  Branch (77:42): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  423|      0|      verbose_file = stderr;
  424|      0|    else if (OMPT_STR_MATCH(ompt_env_verbose_init, "STDOUT"))
  ------------------
  |  |   77|      0|#define OMPT_STR_MATCH(haystack, needle) __kmp_str_match(haystack, 0, needle)
  |  |  ------------------
  |  |  |  Branch (77:42): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  425|      0|      verbose_file = stdout;
  426|      0|    else
  427|      0|      verbose_file = fopen(ompt_env_verbose_init, "w");
  428|      0|  } else
  429|      1|    verbose_init = 0;
  430|       |
  431|       |#if OMPT_DEBUG
  432|       |  printf("ompt_pre_init(): tool_setting = %d\n", tool_setting);
  433|       |#endif
  434|      1|  switch (tool_setting) {
  ------------------
  |  Branch (434:11): [True: 1, False: 0]
  ------------------
  435|      0|  case omp_tool_disabled:
  ------------------
  |  Branch (435:3): [True: 0, False: 1]
  ------------------
  436|      0|    OMPT_VERBOSE_INIT_PRINT("OMP tool disabled. \n");
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  437|      0|    break;
  438|       |
  439|      1|  case omp_tool_unset:
  ------------------
  |  Branch (439:3): [True: 1, False: 0]
  ------------------
  440|      1|  case omp_tool_enabled:
  ------------------
  |  Branch (440:3): [True: 0, False: 1]
  ------------------
  441|       |
  442|       |    //--------------------------------------------------
  443|       |    // Load tool iff specified in environment variable
  444|       |    //--------------------------------------------------
  445|      1|    ompt_start_tool_result =
  446|      1|        ompt_try_start_tool(__kmp_openmp_version, ompt_get_runtime_version());
  447|       |
  448|      1|    memset(&ompt_enabled, 0, sizeof(ompt_enabled));
  449|      1|    break;
  450|       |
  451|      0|  case omp_tool_error:
  ------------------
  |  Branch (451:3): [True: 0, False: 1]
  ------------------
  452|      0|    fprintf(stderr,
  453|      0|            "Warning: OMP_TOOL has invalid value \"%s\".\n"
  454|      0|            "  legal values are (NULL,\"\",\"disabled\","
  455|      0|            "\"enabled\").\n",
  456|      0|            ompt_env_var);
  457|      0|    break;
  458|      1|  }
  459|      1|  if (verbose_init && verbose_file != stderr && verbose_file != stdout)
  ------------------
  |  Branch (459:7): [True: 0, False: 1]
  |  Branch (459:23): [True: 0, False: 0]
  |  Branch (459:49): [True: 0, False: 0]
  ------------------
  460|      0|    fclose(verbose_file);
  461|       |#if OMPT_DEBUG
  462|       |  printf("ompt_pre_init(): ompt_enabled = %d\n", ompt_enabled.enabled);
  463|       |#endif
  464|      1|}
ompt_post_init:
  468|      1|void ompt_post_init() {
  469|       |  //--------------------------------------------------
  470|       |  // Execute the post-initialization logic only once.
  471|       |  //--------------------------------------------------
  472|      1|  static int ompt_post_initialized = 0;
  473|       |
  474|      1|  if (ompt_post_initialized)
  ------------------
  |  Branch (474:7): [True: 0, False: 1]
  ------------------
  475|      0|    return;
  476|       |
  477|      1|  ompt_post_initialized = 1;
  478|       |
  479|       |  //--------------------------------------------------
  480|       |  // Initialize the tool if so indicated.
  481|       |  //--------------------------------------------------
  482|      1|  if (ompt_start_tool_result) {
  ------------------
  |  Branch (482:7): [True: 0, False: 1]
  ------------------
  483|      0|    ompt_enabled.enabled = !!ompt_start_tool_result->initialize(
  484|      0|        ompt_fn_lookup, omp_get_initial_device(),
  485|      0|        &(ompt_start_tool_result->tool_data));
  486|       |
  487|      0|    if (!ompt_enabled.enabled) {
  ------------------
  |  Branch (487:9): [True: 0, False: 0]
  ------------------
  488|       |      // tool not enabled, zero out the bitmap, and done
  489|      0|      memset(&ompt_enabled, 0, sizeof(ompt_enabled));
  490|      0|      return;
  491|      0|    }
  492|       |
  493|      0|    kmp_info_t *root_thread = ompt_get_thread();
  494|       |
  495|      0|    ompt_set_thread_state(root_thread, ompt_state_overhead);
  496|       |
  497|      0|    if (ompt_enabled.ompt_callback_thread_begin) {
  ------------------
  |  Branch (497:9): [True: 0, False: 0]
  ------------------
  498|      0|      ompt_callbacks.ompt_callback(ompt_callback_thread_begin)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
  499|      0|          ompt_thread_initial, __ompt_get_thread_data_internal());
  500|      0|    }
  501|      0|    ompt_data_t *task_data = nullptr;
  502|      0|    ompt_data_t *parallel_data = nullptr;
  503|      0|    __ompt_get_task_info_internal(0, NULL, &task_data, NULL, &parallel_data,
  504|      0|                                  NULL);
  505|      0|    if (ompt_enabled.ompt_callback_implicit_task) {
  ------------------
  |  Branch (505:9): [True: 0, False: 0]
  ------------------
  506|      0|      ompt_callbacks.ompt_callback(ompt_callback_implicit_task)(
  ------------------
  |  |   27|      0|#define ompt_callback(e) e##_callback
  ------------------
  507|      0|          ompt_scope_begin, parallel_data, task_data, 1, 1, ompt_task_initial);
  508|      0|    }
  509|       |
  510|      0|    ompt_set_thread_state(root_thread, ompt_state_work_serial);
  511|      0|  }
  512|      1|}
ompt_fini:
  514|      1|void ompt_fini() {
  515|      1|  if (ompt_enabled.enabled) {
  ------------------
  |  Branch (515:7): [True: 0, False: 1]
  ------------------
  516|      0|    if (ompt_start_tool_result && ompt_start_tool_result->finalize) {
  ------------------
  |  Branch (516:9): [True: 0, False: 0]
  |  Branch (516:35): [True: 0, False: 0]
  ------------------
  517|      0|      ompt_start_tool_result->finalize(&(ompt_start_tool_result->tool_data));
  518|      0|    }
  519|      0|    if (libomptarget_ompt_result && libomptarget_ompt_result->finalize) {
  ------------------
  |  Branch (519:9): [True: 0, False: 0]
  |  Branch (519:37): [True: 0, False: 0]
  ------------------
  520|      0|      libomptarget_ompt_result->finalize(NULL);
  521|      0|    }
  522|      0|  }
  523|       |
  524|      1|  if (ompt_tool_module)
  ------------------
  |  Branch (524:7): [True: 0, False: 1]
  ------------------
  525|      0|    OMPT_DLCLOSE(ompt_tool_module);
  ------------------
  |  |  110|      0|#define OMPT_DLCLOSE(Lib) dlclose(Lib)
  ------------------
  526|      1|  memset(&ompt_enabled, 0, sizeof(ompt_enabled));
  527|      1|}
ompt-general.cpp:_ZL19ompt_try_start_tooljPKc:
  248|      1|ompt_try_start_tool(unsigned int omp_version, const char *runtime_version) {
  249|      1|  ompt_start_tool_result_t *ret = NULL;
  250|      1|  ompt_start_tool_t start_tool = NULL;
  251|       |#if KMP_OS_WINDOWS
  252|       |  // Cannot use colon to describe a list of absolute paths on Windows
  253|       |  const char *sep = ";";
  254|       |#else
  255|      1|  const char *sep = ":";
  256|      1|#endif
  257|       |
  258|      1|  OMPT_VERBOSE_INIT_PRINT("----- START LOGGING OF TOOL REGISTRATION -----\n");
  ------------------
  |  |   53|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   54|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  259|      1|  OMPT_VERBOSE_INIT_PRINT("Search for OMP tool in current address space... ");
  ------------------
  |  |   53|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   54|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  260|       |
  261|       |#if KMP_OS_DARWIN
  262|       |  // Try in the current address space
  263|       |  ret = ompt_tool_darwin(omp_version, runtime_version);
  264|       |#elif OMPT_HAVE_WEAK_ATTRIBUTE
  265|       |  ret = ompt_start_tool(omp_version, runtime_version);
  266|       |#elif OMPT_HAVE_PSAPI
  267|       |  ret = ompt_tool_windows(omp_version, runtime_version);
  268|       |#else
  269|       |#error Activation of OMPT is not supported on this platform.
  270|       |#endif
  271|      1|  if (ret) {
  ------------------
  |  Branch (271:7): [True: 0, False: 1]
  ------------------
  272|      0|    OMPT_VERBOSE_INIT_CONTINUED_PRINT("Success.\n");
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  273|      0|    OMPT_VERBOSE_INIT_PRINT(
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  274|      0|        "Tool was started and is using the OMPT interface.\n");
  275|      0|    OMPT_VERBOSE_INIT_PRINT("----- END LOGGING OF TOOL REGISTRATION -----\n");
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  276|      0|    return ret;
  277|      0|  }
  278|       |
  279|       |  // Try tool-libraries-var ICV
  280|      1|  OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed.\n");
  ------------------
  |  |   56|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   57|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  281|      1|  const char *tool_libs = getenv("OMP_TOOL_LIBRARIES");
  282|      1|  if (tool_libs) {
  ------------------
  |  Branch (282:7): [True: 0, False: 1]
  ------------------
  283|      0|    OMPT_VERBOSE_INIT_PRINT("Searching tool libraries...\n");
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  284|      0|    OMPT_VERBOSE_INIT_PRINT("OMP_TOOL_LIBRARIES = %s\n", tool_libs);
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  285|      0|    char *libs = __kmp_str_format("%s", tool_libs);
  286|      0|    char *buf;
  287|      0|    char *fname = __kmp_str_token(libs, sep, &buf);
  288|       |    // Reset dl-error
  289|      0|    dlerror();
  290|       |
  291|      0|    while (fname) {
  ------------------
  |  Branch (291:12): [True: 0, False: 0]
  ------------------
  292|      0|#if KMP_OS_UNIX
  293|      0|      OMPT_VERBOSE_INIT_PRINT("Opening %s... ", fname);
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  294|      0|      void *h = dlopen(fname, RTLD_LAZY);
  295|      0|      if (!h) {
  ------------------
  |  Branch (295:11): [True: 0, False: 0]
  ------------------
  296|      0|        OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed: %s\n", dlerror());
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  297|      0|      } else {
  298|      0|        OMPT_VERBOSE_INIT_CONTINUED_PRINT("Success. \n");
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  299|      0|        OMPT_VERBOSE_INIT_PRINT("Searching for ompt_start_tool in %s... ",
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  300|      0|                                fname);
  301|      0|        dlerror(); // Clear any existing error
  302|      0|        start_tool = (ompt_start_tool_t)dlsym(h, "ompt_start_tool");
  303|      0|        if (!start_tool) {
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|          char *error = dlerror();
  305|      0|          if (error != NULL) {
  ------------------
  |  Branch (305:15): [True: 0, False: 0]
  ------------------
  306|      0|            OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed: %s\n", error);
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  307|      0|          } else {
  308|      0|            OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed: %s\n",
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  309|      0|                                              "ompt_start_tool = NULL");
  310|      0|          }
  311|      0|        } else
  312|       |#elif KMP_OS_WINDOWS
  313|       |      OMPT_VERBOSE_INIT_PRINT("Opening %s... ", fname);
  314|       |      HMODULE h = LoadLibrary(fname);
  315|       |      if (!h) {
  316|       |        OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed: Error %u\n",
  317|       |                                          (unsigned)GetLastError());
  318|       |      } else {
  319|       |        OMPT_VERBOSE_INIT_CONTINUED_PRINT("Success. \n");
  320|       |        OMPT_VERBOSE_INIT_PRINT("Searching for ompt_start_tool in %s... ",
  321|       |                                fname);
  322|       |        start_tool = (ompt_start_tool_t)GetProcAddress(h, "ompt_start_tool");
  323|       |        if (!start_tool) {
  324|       |          OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed: Error %u\n",
  325|       |                                            (unsigned)GetLastError());
  326|       |        } else
  327|       |#else
  328|       |#error Activation of OMPT is not supported on this platform.
  329|       |#endif
  330|      0|        { // if (start_tool)
  331|      0|          ret = (*start_tool)(omp_version, runtime_version);
  332|      0|          if (ret) {
  ------------------
  |  Branch (332:15): [True: 0, False: 0]
  ------------------
  333|      0|            OMPT_VERBOSE_INIT_CONTINUED_PRINT("Success.\n");
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  334|      0|            OMPT_VERBOSE_INIT_PRINT(
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  335|      0|                "Tool was started and is using the OMPT interface.\n");
  336|      0|            ompt_tool_module = h;
  337|      0|            break;
  338|      0|          }
  339|      0|          OMPT_VERBOSE_INIT_CONTINUED_PRINT(
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  340|      0|              "Found but not using the OMPT interface.\n");
  341|      0|          OMPT_VERBOSE_INIT_PRINT("Continuing search...\n");
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  342|      0|        }
  343|      0|        OMPT_DLCLOSE(h);
  ------------------
  |  |  110|      0|#define OMPT_DLCLOSE(Lib) dlclose(Lib)
  ------------------
  344|      0|      }
  345|      0|      fname = __kmp_str_token(NULL, sep, &buf);
  346|      0|    }
  347|      0|    __kmp_str_free(&libs);
  348|      1|  } else {
  349|      1|    OMPT_VERBOSE_INIT_PRINT("No OMP_TOOL_LIBRARIES defined.\n");
  ------------------
  |  |   53|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   54|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  350|      1|  }
  351|       |
  352|       |  // usable tool found in tool-libraries
  353|      1|  if (ret) {
  ------------------
  |  Branch (353:7): [True: 0, False: 1]
  ------------------
  354|      0|    OMPT_VERBOSE_INIT_PRINT("----- END LOGGING OF TOOL REGISTRATION -----\n");
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  355|      0|    return ret;
  356|      0|  }
  357|       |
  358|      1|#if KMP_OS_UNIX
  359|      1|  { // Non-standard: load archer tool if application is built with TSan
  360|      1|    const char *fname = "libarcher.so";
  361|      1|    OMPT_VERBOSE_INIT_PRINT(
  ------------------
  |  |   53|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   54|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  362|      1|        "...searching tool libraries failed. Using archer tool.\n");
  363|      1|    OMPT_VERBOSE_INIT_PRINT("Opening %s... ", fname);
  ------------------
  |  |   53|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   54|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  364|      1|    void *h = dlopen(fname, RTLD_LAZY);
  365|      1|    if (h) {
  ------------------
  |  Branch (365:9): [True: 0, False: 1]
  ------------------
  366|      0|      OMPT_VERBOSE_INIT_CONTINUED_PRINT("Success.\n");
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  367|      0|      OMPT_VERBOSE_INIT_PRINT("Searching for ompt_start_tool in %s... ", fname);
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  368|      0|      start_tool = (ompt_start_tool_t)dlsym(h, "ompt_start_tool");
  369|      0|      if (start_tool) {
  ------------------
  |  Branch (369:11): [True: 0, False: 0]
  ------------------
  370|      0|        ret = (*start_tool)(omp_version, runtime_version);
  371|      0|        if (ret) {
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|      0|          OMPT_VERBOSE_INIT_CONTINUED_PRINT("Success.\n");
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  373|      0|          OMPT_VERBOSE_INIT_PRINT(
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  374|      0|              "Tool was started and is using the OMPT interface.\n");
  375|      0|          OMPT_VERBOSE_INIT_PRINT(
  ------------------
  |  |   53|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  376|      0|              "----- END LOGGING OF TOOL REGISTRATION -----\n");
  377|      0|          return ret;
  378|      0|        }
  379|      0|        OMPT_VERBOSE_INIT_CONTINUED_PRINT(
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  380|      0|            "Found but not using the OMPT interface.\n");
  381|      0|      } else {
  382|      0|        OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed: %s\n", dlerror());
  ------------------
  |  |   56|      0|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (56:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  383|      0|      }
  384|      0|    }
  385|      1|  }
  386|      1|#endif
  387|      1|  OMPT_VERBOSE_INIT_PRINT("No OMP tool loaded.\n");
  ------------------
  |  |   53|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   54|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  388|      1|  OMPT_VERBOSE_INIT_PRINT("----- END LOGGING OF TOOL REGISTRATION -----\n");
  ------------------
  |  |   53|      1|  if (verbose_init)                                                            \
  |  |  ------------------
  |  |  |  Branch (53:7): [True: 0, False: 1]
  |  |  ------------------
  |  |   54|      1|  fprintf(verbose_file, __VA_ARGS__)
  ------------------
  389|      1|  return ret;
  390|      1|}

_Z29__ompt_get_task_info_internaliPiPP11ompt_data_tPP12ompt_frame_tS2_S_:
  361|      1|                                  int *thread_num) {
  362|      1|  if (__kmp_get_gtid() < 0)
  ------------------
  |  | 3466|      1|#define __kmp_get_gtid() __kmp_get_global_thread_id()
  ------------------
  |  Branch (362:7): [True: 0, False: 1]
  ------------------
  363|      0|    return 0;
  364|       |
  365|      1|  if (ancestor_level < 0)
  ------------------
  |  Branch (365:7): [True: 0, False: 1]
  ------------------
  366|      0|    return 0;
  367|       |
  368|       |  // copied from __ompt_get_scheduling_taskinfo
  369|      1|  ompt_task_info_t *info = NULL;
  370|      1|  ompt_team_info_t *team_info = NULL;
  371|      1|  kmp_info_t *thr = ompt_get_thread();
  372|      1|  int level = ancestor_level;
  373|       |
  374|      1|  if (thr) {
  ------------------
  |  Branch (374:7): [True: 1, False: 0]
  ------------------
  375|      1|    kmp_taskdata_t *taskdata = thr->th.th_current_task;
  376|      1|    if (taskdata == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 1]
  ------------------
  377|      0|      return 0;
  378|      1|    kmp_team *team = thr->th.th_team, *prev_team = NULL;
  379|      1|    if (team == NULL)
  ------------------
  |  Branch (379:9): [True: 0, False: 1]
  ------------------
  380|      0|      return 0;
  381|      1|    ompt_lw_taskteam_t *lwt = NULL,
  382|      1|                       *next_lwt = LWT_FROM_TEAM(taskdata->td_team);
  ------------------
  |  |   36|      1|#define LWT_FROM_TEAM(team) (team)->t.ompt_serialized_team_info
  ------------------
  383|       |
  384|      1|    while (ancestor_level > 0) {
  ------------------
  |  Branch (384:12): [True: 0, False: 1]
  ------------------
  385|       |      // next lightweight team (if any)
  386|      0|      if (lwt)
  ------------------
  |  Branch (386:11): [True: 0, False: 0]
  ------------------
  387|      0|        lwt = lwt->parent;
  388|       |
  389|       |      // next heavyweight team (if any) after
  390|       |      // lightweight teams are exhausted
  391|      0|      if (!lwt && taskdata) {
  ------------------
  |  Branch (391:11): [True: 0, False: 0]
  |  Branch (391:19): [True: 0, False: 0]
  ------------------
  392|       |        // first try scheduling parent (for explicit task scheduling)
  393|      0|        if (taskdata->ompt_task_info.scheduling_parent) {
  ------------------
  |  Branch (393:13): [True: 0, False: 0]
  ------------------
  394|      0|          taskdata = taskdata->ompt_task_info.scheduling_parent;
  395|      0|        } else if (next_lwt) {
  ------------------
  |  Branch (395:20): [True: 0, False: 0]
  ------------------
  396|      0|          lwt = next_lwt;
  397|      0|          next_lwt = NULL;
  398|      0|        } else {
  399|       |          // then go for implicit tasks
  400|      0|          taskdata = taskdata->td_parent;
  401|      0|          if (team == NULL)
  ------------------
  |  Branch (401:15): [True: 0, False: 0]
  ------------------
  402|      0|            return 0;
  403|      0|          prev_team = team;
  404|      0|          team = team->t.t_parent;
  405|      0|          if (taskdata) {
  ------------------
  |  Branch (405:15): [True: 0, False: 0]
  ------------------
  406|      0|            next_lwt = LWT_FROM_TEAM(taskdata->td_team);
  ------------------
  |  |   36|      0|#define LWT_FROM_TEAM(team) (team)->t.ompt_serialized_team_info
  ------------------
  407|      0|          }
  408|      0|        }
  409|      0|      }
  410|      0|      ancestor_level--;
  411|      0|    }
  412|       |
  413|      1|    if (lwt) {
  ------------------
  |  Branch (413:9): [True: 0, False: 1]
  ------------------
  414|      0|      info = &lwt->ompt_task_info;
  415|      0|      team_info = &lwt->ompt_team_info;
  416|      0|      if (type) {
  ------------------
  |  Branch (416:11): [True: 0, False: 0]
  ------------------
  417|      0|        *type = ompt_task_implicit;
  418|      0|      }
  419|      1|    } else if (taskdata) {
  ------------------
  |  Branch (419:16): [True: 1, False: 0]
  ------------------
  420|      1|      info = &taskdata->ompt_task_info;
  421|      1|      team_info = &team->t.ompt_team_info;
  422|      1|      if (type) {
  ------------------
  |  Branch (422:11): [True: 0, False: 1]
  ------------------
  423|      0|        if (taskdata->td_parent) {
  ------------------
  |  Branch (423:13): [True: 0, False: 0]
  ------------------
  424|      0|          *type = (taskdata->td_flags.tasktype ? ompt_task_explicit
  ------------------
  |  Branch (424:20): [True: 0, False: 0]
  ------------------
  425|      0|                                               : ompt_task_implicit) |
  426|      0|                  TASK_TYPE_DETAILS_FORMAT(taskdata);
  ------------------
  |  |   48|      0|  ((info->td_flags.task_serial || info->td_flags.tasking_ser)                  \
  |  |  ------------------
  |  |  |  Branch (48:5): [True: 0, False: 0]
  |  |  |  Branch (48:35): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|       ? ompt_task_undeferred                                                  \
  |  |   50|      0|       : 0x0) |                                                                \
  |  |   51|      0|      ((!(info->td_flags.tiedness)) ? ompt_task_untied : 0x0) |                \
  |  |  ------------------
  |  |  |  Branch (51:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   52|      0|      (info->td_flags.final ? ompt_task_final : 0x0) |                         \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|      (info->td_flags.merged_if0 ? ompt_task_mergeable : 0x0)
  |  |  ------------------
  |  |  |  Branch (53:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  427|      0|        } else {
  428|      0|          *type = ompt_task_initial;
  429|      0|        }
  430|      0|      }
  431|      1|    }
  432|      1|    if (task_data) {
  ------------------
  |  Branch (432:9): [True: 1, False: 0]
  ------------------
  433|      1|      *task_data = info ? &info->task_data : NULL;
  ------------------
  |  Branch (433:20): [True: 1, False: 0]
  ------------------
  434|      1|    }
  435|      1|    if (task_frame) {
  ------------------
  |  Branch (435:9): [True: 0, False: 1]
  ------------------
  436|       |      // OpenMP spec asks for the scheduling task to be returned.
  437|      0|      *task_frame = info ? &info->frame : NULL;
  ------------------
  |  Branch (437:21): [True: 0, False: 0]
  ------------------
  438|      0|    }
  439|      1|    if (parallel_data) {
  ------------------
  |  Branch (439:9): [True: 1, False: 0]
  ------------------
  440|      1|      *parallel_data = team_info ? &(team_info->parallel_data) : NULL;
  ------------------
  |  Branch (440:24): [True: 1, False: 0]
  ------------------
  441|      1|    }
  442|      1|    if (thread_num) {
  ------------------
  |  Branch (442:9): [True: 0, False: 1]
  ------------------
  443|      0|      if (level == 0)
  ------------------
  |  Branch (443:11): [True: 0, False: 0]
  ------------------
  444|      0|        *thread_num = __kmp_get_tid();
  ------------------
  |  | 3468|      0|#define __kmp_get_tid() (__kmp_tid_from_gtid(__kmp_get_gtid()))
  |  |  ------------------
  |  |  |  | 3466|      0|#define __kmp_get_gtid() __kmp_get_global_thread_id()
  |  |  ------------------
  ------------------
  445|      0|      else if (lwt)
  ------------------
  |  Branch (445:16): [True: 0, False: 0]
  ------------------
  446|      0|        *thread_num = 0;
  447|      0|      else if (!prev_team) {
  ------------------
  |  Branch (447:16): [True: 0, False: 0]
  ------------------
  448|       |        // The innermost parallel region contains at least one explicit task.
  449|       |        // The task at level > 0 is either an implicit task that
  450|       |        // corresponds to the mentioned region or one of the explicit tasks
  451|       |        // nested inside the same region. Note that the task isn't the
  452|       |        // innermost explicit tasks (because of condition level > 0).
  453|       |        // Since the task at this level still belongs to the innermost parallel
  454|       |        // region, thread_num is determined the same way as for level==0.
  455|      0|        *thread_num = __kmp_get_tid();
  ------------------
  |  | 3468|      0|#define __kmp_get_tid() (__kmp_tid_from_gtid(__kmp_get_gtid()))
  |  |  ------------------
  |  |  |  | 3466|      0|#define __kmp_get_gtid() __kmp_get_global_thread_id()
  |  |  ------------------
  ------------------
  456|      0|      } else
  457|      0|        *thread_num = prev_team->t.t_master_tid;
  458|       |      //        *thread_num = team->t.t_master_tid;
  459|      0|    }
  460|      1|    return info ? 2 : 0;
  ------------------
  |  Branch (460:12): [True: 1, False: 0]
  ------------------
  461|      1|  }
  462|      0|  return 0;
  463|      1|}
_Z21__ompt_team_assign_idP8kmp_team11ompt_data_t:
  501|      3|void __ompt_team_assign_id(kmp_team_t *team, ompt_data_t ompt_pid) {
  502|      3|  team->t.ompt_team_info.parallel_data = ompt_pid;
  503|      3|}

_ZN22OmptReturnAddressGuardC2EiPv:
  139|  12.3k|  OmptReturnAddressGuard(int Gtid, void *ReturnAddress) : Gtid(Gtid) {
  140|  12.3k|    if (ompt_enabled.enabled && Gtid >= 0 && __kmp_threads[Gtid] &&
  ------------------
  |  Branch (140:9): [True: 0, False: 12.3k]
  |  Branch (140:33): [True: 0, False: 0]
  |  Branch (140:46): [True: 0, False: 0]
  ------------------
  141|      0|        !__kmp_threads[Gtid]->th.ompt_thread_info.return_address) {
  ------------------
  |  Branch (141:9): [True: 0, False: 0]
  ------------------
  142|      0|      SetAddress = true;
  143|      0|      __kmp_threads[Gtid]->th.ompt_thread_info.return_address = ReturnAddress;
  144|      0|    }
  145|  12.3k|  }
_ZN22OmptReturnAddressGuardD2Ev:
  146|  12.3k|  ~OmptReturnAddressGuard() {
  147|  12.3k|    if (SetAddress)
  ------------------
  |  Branch (147:9): [True: 0, False: 12.3k]
  ------------------
  148|      0|      __kmp_threads[Gtid]->th.ompt_thread_info.return_address = NULL;
  149|  12.3k|  }
_Z26__ompt_load_return_addressi:
   79|  12.3k|inline void *__ompt_load_return_address(int gtid) {
   80|  12.3k|  kmp_info_t *thr = __kmp_threads[gtid];
   81|  12.3k|  void *return_address = thr->th.ompt_thread_info.return_address;
   82|       |  thr->th.ompt_thread_info.return_address = NULL;
   83|  12.3k|  return return_address;
   84|  12.3k|}
_Z20ompt_get_thread_gtidi:
  115|      1|inline kmp_info_t *ompt_get_thread_gtid(int gtid) {
  116|      1|  return (gtid >= 0) ? __kmp_thread_from_gtid(gtid) : NULL;
  ------------------
  |  Branch (116:10): [True: 1, False: 0]
  ------------------
  117|      1|}
_Z15ompt_get_threadv:
  119|      1|inline kmp_info_t *ompt_get_thread() {
  120|      1|  int gtid = __kmp_get_gtid();
  ------------------
  |  | 3466|      1|#define __kmp_get_gtid() __kmp_get_global_thread_id()
  ------------------
  121|      1|  return ompt_get_thread_gtid(gtid);
  122|      1|}
_Z24ompt_get_runtime_versionv:
  129|      1|inline const char *ompt_get_runtime_version() {
  130|      1|  return &__kmp_version_lib_ver[KMP_VERSION_MAGIC_LEN];
  ------------------
  |  |   32|      1|#define KMP_VERSION_MAGIC_LEN 6 // Length of KMP_VERSION_MAGIC_STR.
  ------------------
  131|      1|}

__kmp_affinity_determine_capable:
  124|      1|void __kmp_affinity_determine_capable(const char *env_var) {
  125|       |  // Check and see if the OS supports thread affinity.
  126|       |
  127|      1|#if KMP_OS_LINUX
  128|      1|#define KMP_CPU_SET_SIZE_LIMIT (1024 * 1024)
  129|      1|#define KMP_CPU_SET_TRY_SIZE CACHE_LINE
  130|       |#elif KMP_OS_FREEBSD
  131|       |#define KMP_CPU_SET_SIZE_LIMIT (sizeof(cpuset_t))
  132|       |#endif
  133|       |
  134|      1|  int verbose = __kmp_affinity.flags.verbose;
  135|      1|  int warnings = __kmp_affinity.flags.warnings;
  136|      1|  enum affinity_type type = __kmp_affinity.type;
  137|       |
  138|      1|#if KMP_OS_LINUX
  139|      1|  long gCode;
  140|      1|  unsigned char *buf;
  141|      1|  buf = (unsigned char *)KMP_INTERNAL_MALLOC(KMP_CPU_SET_SIZE_LIMIT);
  ------------------
  |  |  110|      1|#define KMP_INTERNAL_MALLOC(sz) malloc(sz)
  ------------------
  142|       |
  143|       |  // If the syscall returns a suggestion for the size,
  144|       |  // then we don't have to search for an appropriate size.
  145|      1|  gCode = syscall(__NR_sched_getaffinity, 0, KMP_CPU_SET_TRY_SIZE, buf);
  ------------------
  |  |  129|      1|#define KMP_CPU_SET_TRY_SIZE CACHE_LINE
  |  |  ------------------
  |  |  |  |  108|      1|# define CACHE_LINE 64
  |  |  ------------------
  ------------------
  146|      1|  KA_TRACE(30, ("__kmp_affinity_determine_capable: "
  147|      1|                "initial getaffinity call returned %ld errno = %d\n",
  148|      1|                gCode, errno));
  149|       |
  150|      1|  if (gCode < 0 && errno != EINVAL) {
  ------------------
  |  Branch (150:7): [True: 0, False: 1]
  |  Branch (150:20): [True: 0, False: 0]
  ------------------
  151|       |    // System call not supported
  152|      0|    if (verbose ||
  ------------------
  |  Branch (152:9): [True: 0, False: 0]
  ------------------
  153|      0|        (warnings && (type != affinity_none) && (type != affinity_default) &&
  ------------------
  |  Branch (153:10): [True: 0, False: 0]
  |  Branch (153:22): [True: 0, False: 0]
  |  Branch (153:49): [True: 0, False: 0]
  ------------------
  154|      0|         (type != affinity_disabled))) {
  ------------------
  |  Branch (154:10): [True: 0, False: 0]
  ------------------
  155|      0|      int error = errno;
  156|      0|      kmp_msg_t err_code = KMP_ERR(error);
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  157|      0|      __kmp_msg(kmp_ms_warning, KMP_MSG(GetAffSysCallNotSupported, env_var),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
  158|      0|                err_code, __kmp_msg_null);
  159|      0|      if (__kmp_generate_warnings == kmp_warnings_off) {
  ------------------
  |  Branch (159:11): [True: 0, False: 0]
  ------------------
  160|      0|        __kmp_str_free(&err_code.str);
  161|      0|      }
  162|      0|    }
  163|      0|    KMP_AFFINITY_DISABLE();
  ------------------
  |  |  685|      0|#define KMP_AFFINITY_DISABLE() (__kmp_affin_mask_size = 0)
  ------------------
  164|      0|    KMP_INTERNAL_FREE(buf);
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  165|      0|    return;
  166|      1|  } else if (gCode > 0) {
  ------------------
  |  Branch (166:14): [True: 1, False: 0]
  ------------------
  167|       |    // The optimal situation: the OS returns the size of the buffer it expects.
  168|      1|    KMP_AFFINITY_ENABLE(gCode);
  ------------------
  |  |  686|      1|#define KMP_AFFINITY_ENABLE(mask_size) (__kmp_affin_mask_size = mask_size)
  ------------------
  169|      1|    KA_TRACE(10, ("__kmp_affinity_determine_capable: "
  170|      1|                  "affinity supported (mask size %d)\n",
  171|      1|                  (int)__kmp_affin_mask_size));
  172|      1|    KMP_INTERNAL_FREE(buf);
  ------------------
  |  |  111|      1|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  173|      1|    return;
  174|      1|  }
  175|       |
  176|       |  // Call the getaffinity system call repeatedly with increasing set sizes
  177|       |  // until we succeed, or reach an upper bound on the search.
  178|      0|  KA_TRACE(30, ("__kmp_affinity_determine_capable: "
  179|      0|                "searching for proper set size\n"));
  180|      0|  int size;
  181|      0|  for (size = 1; size <= KMP_CPU_SET_SIZE_LIMIT; size *= 2) {
  ------------------
  |  |  128|      0|#define KMP_CPU_SET_SIZE_LIMIT (1024 * 1024)
  ------------------
  |  Branch (181:18): [True: 0, False: 0]
  ------------------
  182|      0|    gCode = syscall(__NR_sched_getaffinity, 0, size, buf);
  183|      0|    KA_TRACE(30, ("__kmp_affinity_determine_capable: "
  184|      0|                  "getaffinity for mask size %ld returned %ld errno = %d\n",
  185|      0|                  size, gCode, errno));
  186|       |
  187|      0|    if (gCode < 0) {
  ------------------
  |  Branch (187:9): [True: 0, False: 0]
  ------------------
  188|      0|      if (errno == ENOSYS) {
  ------------------
  |  Branch (188:11): [True: 0, False: 0]
  ------------------
  189|       |        // We shouldn't get here
  190|      0|        KA_TRACE(30, ("__kmp_affinity_determine_capable: "
  191|      0|                      "inconsistent OS call behavior: errno == ENOSYS for mask "
  192|      0|                      "size %d\n",
  193|      0|                      size));
  194|      0|        if (verbose ||
  ------------------
  |  Branch (194:13): [True: 0, False: 0]
  ------------------
  195|      0|            (warnings && (type != affinity_none) &&
  ------------------
  |  Branch (195:14): [True: 0, False: 0]
  |  Branch (195:26): [True: 0, False: 0]
  ------------------
  196|      0|             (type != affinity_default) && (type != affinity_disabled))) {
  ------------------
  |  Branch (196:14): [True: 0, False: 0]
  |  Branch (196:44): [True: 0, False: 0]
  ------------------
  197|      0|          int error = errno;
  198|      0|          kmp_msg_t err_code = KMP_ERR(error);
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  199|      0|          __kmp_msg(kmp_ms_warning, KMP_MSG(GetAffSysCallNotSupported, env_var),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
  200|      0|                    err_code, __kmp_msg_null);
  201|      0|          if (__kmp_generate_warnings == kmp_warnings_off) {
  ------------------
  |  Branch (201:15): [True: 0, False: 0]
  ------------------
  202|      0|            __kmp_str_free(&err_code.str);
  203|      0|          }
  204|      0|        }
  205|      0|        KMP_AFFINITY_DISABLE();
  ------------------
  |  |  685|      0|#define KMP_AFFINITY_DISABLE() (__kmp_affin_mask_size = 0)
  ------------------
  206|      0|        KMP_INTERNAL_FREE(buf);
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  207|      0|        return;
  208|      0|      }
  209|      0|      continue;
  210|      0|    }
  211|       |
  212|      0|    KMP_AFFINITY_ENABLE(gCode);
  ------------------
  |  |  686|      0|#define KMP_AFFINITY_ENABLE(mask_size) (__kmp_affin_mask_size = mask_size)
  ------------------
  213|      0|    KA_TRACE(10, ("__kmp_affinity_determine_capable: "
  214|      0|                  "affinity supported (mask size %d)\n",
  215|      0|                  (int)__kmp_affin_mask_size));
  216|      0|    KMP_INTERNAL_FREE(buf);
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  217|      0|    return;
  218|      0|  }
  219|       |#elif KMP_OS_FREEBSD
  220|       |  long gCode;
  221|       |  unsigned char *buf;
  222|       |  buf = (unsigned char *)KMP_INTERNAL_MALLOC(KMP_CPU_SET_SIZE_LIMIT);
  223|       |  gCode = pthread_getaffinity_np(pthread_self(), KMP_CPU_SET_SIZE_LIMIT,
  224|       |                                 reinterpret_cast<cpuset_t *>(buf));
  225|       |  KA_TRACE(30, ("__kmp_affinity_determine_capable: "
  226|       |                "initial getaffinity call returned %d errno = %d\n",
  227|       |                gCode, errno));
  228|       |  if (gCode == 0) {
  229|       |    KMP_AFFINITY_ENABLE(KMP_CPU_SET_SIZE_LIMIT);
  230|       |    KA_TRACE(10, ("__kmp_affinity_determine_capable: "
  231|       |                  "affinity supported (mask size %d)\n",
  232|       |                  (int)__kmp_affin_mask_size));
  233|       |    KMP_INTERNAL_FREE(buf);
  234|       |    return;
  235|       |  }
  236|       |#endif
  237|      0|  KMP_INTERNAL_FREE(buf);
  ------------------
  |  |  111|      0|#define KMP_INTERNAL_FREE(p) free(p)
  ------------------
  238|       |
  239|       |  // Affinity is not supported
  240|      0|  KMP_AFFINITY_DISABLE();
  ------------------
  |  |  685|      0|#define KMP_AFFINITY_DISABLE() (__kmp_affin_mask_size = 0)
  ------------------
  241|      0|  KA_TRACE(10, ("__kmp_affinity_determine_capable: "
  242|      0|                "cannot determine mask size - affinity not supported\n"));
  243|      0|  if (verbose || (warnings && (type != affinity_none) &&
  ------------------
  |  Branch (243:7): [True: 0, False: 0]
  |  Branch (243:19): [True: 0, False: 0]
  |  Branch (243:31): [True: 0, False: 0]
  ------------------
  244|      0|                  (type != affinity_default) && (type != affinity_disabled))) {
  ------------------
  |  Branch (244:19): [True: 0, False: 0]
  |  Branch (244:49): [True: 0, False: 0]
  ------------------
  245|      0|    KMP_WARNING(AffCantGetMaskSize, env_var);
  ------------------
  |  |  145|      0|  __kmp_msg(kmp_ms_warning, KMP_MSG(__VA_ARGS__), __kmp_msg_null)
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  ------------------
  246|      0|  }
  247|      0|}
__kmp_create_worker:
  710|      1|void __kmp_create_worker(int gtid, kmp_info_t *th, size_t stack_size) {
  711|      1|  pthread_t handle;
  712|      1|  pthread_attr_t thread_attr;
  713|      1|  int status;
  714|       |
  715|      1|  th->th.th_info.ds.ds_gtid = gtid;
  716|       |
  717|       |#if KMP_STATS_ENABLED
  718|       |  // sets up worker thread stats
  719|       |  __kmp_acquire_tas_lock(&__kmp_stats_lock, gtid);
  720|       |
  721|       |  // th->th.th_stats is used to transfer thread-specific stats-pointer to
  722|       |  // __kmp_launch_worker. So when thread is created (goes into
  723|       |  // __kmp_launch_worker) it will set its thread local pointer to
  724|       |  // th->th.th_stats
  725|       |  if (!KMP_UBER_GTID(gtid)) {
  726|       |    th->th.th_stats = __kmp_stats_list->push_back(gtid);
  727|       |  } else {
  728|       |    // For root threads, __kmp_stats_thread_ptr is set in __kmp_register_root(),
  729|       |    // so set the th->th.th_stats field to it.
  730|       |    th->th.th_stats = __kmp_stats_thread_ptr;
  731|       |  }
  732|       |  __kmp_release_tas_lock(&__kmp_stats_lock, gtid);
  733|       |
  734|       |#endif // KMP_STATS_ENABLED
  735|       |
  736|      1|  if (KMP_UBER_GTID(gtid)) {
  ------------------
  |  Branch (736:7): [True: 1, False: 0]
  ------------------
  737|      1|    KA_TRACE(10, ("__kmp_create_worker: uber thread (%d)\n", gtid));
  738|      1|    th->th.th_info.ds.ds_thread = pthread_self();
  739|      1|    __kmp_set_stack_info(gtid, th);
  740|      1|    __kmp_check_stack_overlap(th);
  741|      1|    return;
  742|      1|  }
  743|       |
  744|      0|  KA_TRACE(10, ("__kmp_create_worker: try to create thread (%d)\n", gtid));
  745|       |
  746|      0|  KMP_MB(); /* Flush all pending memory write invalidates.  */
  747|       |
  748|      0|#ifdef KMP_THREAD_ATTR
  749|      0|  status = pthread_attr_init(&thread_attr);
  750|      0|  if (status != 0) {
  ------------------
  |  Branch (750:7): [True: 0, False: 0]
  ------------------
  751|      0|    __kmp_fatal(KMP_MSG(CantInitThreadAttrs), KMP_ERR(status), __kmp_msg_null);
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                  __kmp_fatal(KMP_MSG(CantInitThreadAttrs), KMP_ERR(status), __kmp_msg_null);
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  752|      0|  }
  753|      0|  status = pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE);
  754|      0|  if (status != 0) {
  ------------------
  |  Branch (754:7): [True: 0, False: 0]
  ------------------
  755|      0|    __kmp_fatal(KMP_MSG(CantSetWorkerState), KMP_ERR(status), __kmp_msg_null);
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                  __kmp_fatal(KMP_MSG(CantSetWorkerState), KMP_ERR(status), __kmp_msg_null);
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  756|      0|  }
  757|       |
  758|       |  /* Set stack size for this thread now.
  759|       |     The multiple of 2 is there because on some machines, requesting an unusual
  760|       |     stacksize causes the thread to have an offset before the dummy alloca()
  761|       |     takes place to create the offset.  Since we want the user to have a
  762|       |     sufficient stacksize AND support a stack offset, we alloca() twice the
  763|       |     offset so that the upcoming alloca() does not eliminate any premade offset,
  764|       |     and also gives the user the stack space they requested for all threads */
  765|      0|  stack_size += gtid * __kmp_stkoffset * 2;
  766|       |
  767|      0|  KA_TRACE(10, ("__kmp_create_worker: T#%d, default stacksize = %lu bytes, "
  768|      0|                "__kmp_stksize = %lu bytes, final stacksize = %lu bytes\n",
  769|      0|                gtid, KMP_DEFAULT_STKSIZE, __kmp_stksize, stack_size));
  770|       |
  771|      0|#ifdef _POSIX_THREAD_ATTR_STACKSIZE
  772|      0|  status = pthread_attr_setstacksize(&thread_attr, stack_size);
  773|      0|#ifdef KMP_BACKUP_STKSIZE
  774|      0|  if (status != 0) {
  ------------------
  |  Branch (774:7): [True: 0, False: 0]
  ------------------
  775|      0|    if (!__kmp_env_stksize) {
  ------------------
  |  Branch (775:9): [True: 0, False: 0]
  ------------------
  776|      0|      stack_size = KMP_BACKUP_STKSIZE + gtid * __kmp_stkoffset;
  ------------------
  |  | 1159|      0|#define KMP_BACKUP_STKSIZE ((size_t)(2 * 1024 * 1024))
  ------------------
  777|      0|      __kmp_stksize = KMP_BACKUP_STKSIZE;
  ------------------
  |  | 1159|      0|#define KMP_BACKUP_STKSIZE ((size_t)(2 * 1024 * 1024))
  ------------------
  778|      0|      KA_TRACE(10, ("__kmp_create_worker: T#%d, default stacksize = %lu bytes, "
  779|      0|                    "__kmp_stksize = %lu bytes, (backup) final stacksize = %lu "
  780|      0|                    "bytes\n",
  781|      0|                    gtid, KMP_DEFAULT_STKSIZE, __kmp_stksize, stack_size));
  782|      0|      status = pthread_attr_setstacksize(&thread_attr, stack_size);
  783|      0|    }
  784|      0|  }
  785|      0|#endif /* KMP_BACKUP_STKSIZE */
  786|      0|  if (status != 0) {
  ------------------
  |  Branch (786:7): [True: 0, False: 0]
  ------------------
  787|      0|    __kmp_fatal(KMP_MSG(CantSetWorkerStackSize, stack_size), KMP_ERR(status),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                  __kmp_fatal(KMP_MSG(CantSetWorkerStackSize, stack_size), KMP_ERR(status),
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  788|      0|                KMP_HNT(ChangeWorkerStackSize), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  789|      0|  }
  790|      0|#endif /* _POSIX_THREAD_ATTR_STACKSIZE */
  791|       |
  792|      0|#endif /* KMP_THREAD_ATTR */
  793|       |
  794|      0|  status =
  795|      0|      pthread_create(&handle, &thread_attr, __kmp_launch_worker, (void *)th);
  796|      0|  if (status != 0 || !handle) { // ??? Why do we check handle??
  ------------------
  |  Branch (796:7): [True: 0, False: 0]
  |  Branch (796:22): [True: 0, False: 0]
  ------------------
  797|      0|#ifdef _POSIX_THREAD_ATTR_STACKSIZE
  798|      0|    if (status == EINVAL) {
  ------------------
  |  Branch (798:9): [True: 0, False: 0]
  ------------------
  799|      0|      __kmp_fatal(KMP_MSG(CantSetWorkerStackSize, stack_size), KMP_ERR(status),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                    __kmp_fatal(KMP_MSG(CantSetWorkerStackSize, stack_size), KMP_ERR(status),
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  800|      0|                  KMP_HNT(IncreaseWorkerStackSize), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  801|      0|    }
  802|      0|    if (status == ENOMEM) {
  ------------------
  |  Branch (802:9): [True: 0, False: 0]
  ------------------
  803|      0|      __kmp_fatal(KMP_MSG(CantSetWorkerStackSize, stack_size), KMP_ERR(status),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                    __kmp_fatal(KMP_MSG(CantSetWorkerStackSize, stack_size), KMP_ERR(status),
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  804|      0|                  KMP_HNT(DecreaseWorkerStackSize), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  805|      0|    }
  806|      0|#endif /* _POSIX_THREAD_ATTR_STACKSIZE */
  807|      0|    if (status == EAGAIN) {
  ------------------
  |  Branch (807:9): [True: 0, False: 0]
  ------------------
  808|      0|      __kmp_fatal(KMP_MSG(NoResourcesForWorkerThread), KMP_ERR(status),
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
                    __kmp_fatal(KMP_MSG(NoResourcesForWorkerThread), KMP_ERR(status),
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  809|      0|                  KMP_HNT(Decrease_NUM_THREADS), __kmp_msg_null);
  ------------------
  |  |  122|      0|#define KMP_HNT(...) __kmp_msg_format(kmp_i18n_hnt_##__VA_ARGS__)
  ------------------
  810|      0|    }
  811|      0|    KMP_SYSFAIL("pthread_create", status);
  ------------------
  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  |  |  149|      0|              __kmp_msg_null)
  ------------------
  812|      0|  }
  813|       |
  814|      0|  th->th.th_info.ds.ds_thread = handle;
  815|       |
  816|      0|#ifdef KMP_THREAD_ATTR
  817|      0|  status = pthread_attr_destroy(&thread_attr);
  818|      0|  if (status) {
  ------------------
  |  Branch (818:7): [True: 0, False: 0]
  ------------------
  819|      0|    kmp_msg_t err_code = KMP_ERR(status);
  ------------------
  |  |  125|      0|#define KMP_ERR KMP_SYSERRCODE
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  ------------------
  820|      0|    __kmp_msg(kmp_ms_warning, KMP_MSG(CantDestroyThreadAttrs), err_code,
  ------------------
  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  ------------------
  821|      0|              __kmp_msg_null);
  822|      0|    if (__kmp_generate_warnings == kmp_warnings_off) {
  ------------------
  |  Branch (822:9): [True: 0, False: 0]
  ------------------
  823|      0|      __kmp_str_free(&err_code.str);
  824|      0|    }
  825|      0|  }
  826|      0|#endif /* KMP_THREAD_ATTR */
  827|       |
  828|      0|  KMP_MB(); /* Flush all pending memory write invalidates.  */
  829|       |
  830|      0|  KA_TRACE(10, ("__kmp_create_worker: done creating thread (%d)\n", gtid));
  831|       |
  832|      0|} // __kmp_create_worker
__kmp_install_signals:
 1156|      1|void __kmp_install_signals(int parallel_init) {
 1157|      1|  KB_TRACE(10, ("__kmp_install_signals( %d )\n", parallel_init));
 1158|      1|  if (__kmp_handle_signals || !parallel_init) {
  ------------------
  |  Branch (1158:7): [True: 0, False: 1]
  |  Branch (1158:31): [True: 1, False: 0]
  ------------------
 1159|       |    // If ! parallel_init, we do not install handlers, just save original
 1160|       |    // handlers. Let us do it even __handle_signals is 0.
 1161|      1|    sigemptyset(&__kmp_sigset);
 1162|      1|    __kmp_install_one_handler(SIGHUP, __kmp_team_handler, parallel_init);
 1163|      1|    __kmp_install_one_handler(SIGINT, __kmp_team_handler, parallel_init);
 1164|      1|    __kmp_install_one_handler(SIGQUIT, __kmp_team_handler, parallel_init);
 1165|      1|    __kmp_install_one_handler(SIGILL, __kmp_team_handler, parallel_init);
 1166|      1|    __kmp_install_one_handler(SIGABRT, __kmp_team_handler, parallel_init);
 1167|      1|    __kmp_install_one_handler(SIGFPE, __kmp_team_handler, parallel_init);
 1168|      1|    __kmp_install_one_handler(SIGBUS, __kmp_team_handler, parallel_init);
 1169|      1|    __kmp_install_one_handler(SIGSEGV, __kmp_team_handler, parallel_init);
 1170|      1|#ifdef SIGSYS
 1171|      1|    __kmp_install_one_handler(SIGSYS, __kmp_team_handler, parallel_init);
 1172|      1|#endif // SIGSYS
 1173|      1|    __kmp_install_one_handler(SIGTERM, __kmp_team_handler, parallel_init);
 1174|      1|#ifdef SIGPIPE
 1175|       |    __kmp_install_one_handler(SIGPIPE, __kmp_team_handler, parallel_init);
 1176|      1|#endif // SIGPIPE
 1177|      1|  }
 1178|      1|} // __kmp_install_signals
__kmp_register_atfork:
 1318|      1|void __kmp_register_atfork(void) {
 1319|      1|  if (__kmp_need_register_atfork) {
  ------------------
  |  Branch (1319:7): [True: 1, False: 0]
  ------------------
 1320|      1|    int status = pthread_atfork(__kmp_atfork_prepare, __kmp_atfork_parent,
 1321|      1|                                __kmp_atfork_child);
 1322|      1|    KMP_CHECK_SYSFAIL("pthread_atfork", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1323|      1|    __kmp_need_register_atfork = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 1324|      1|  }
 1325|      1|}
__kmp_suspend_uninitialize_thread:
 1360|      1|void __kmp_suspend_uninitialize_thread(kmp_info_t *th) {
 1361|      1|  if (KMP_ATOMIC_LD_ACQ(&th->th.th_suspend_init_count) > __kmp_fork_count) {
  ------------------
  |  | 1249|      1|#define KMP_ATOMIC_LD_ACQ(p) KMP_ATOMIC_LD(p, acquire)
  |  |  ------------------
  |  |  |  | 1245|      1|#define KMP_ATOMIC_LD(p, order) (p)->load(std::memory_order_##order)
  |  |  ------------------
  ------------------
  |  Branch (1361:7): [True: 0, False: 1]
  ------------------
 1362|       |    /* this means we have initialize the suspension pthread objects for this
 1363|       |       thread in this instance of the process */
 1364|      0|    int status;
 1365|       |
 1366|      0|    status = pthread_cond_destroy(&th->th.th_suspend_cv.c_cond);
 1367|      0|    if (status != 0 && status != EBUSY) {
  ------------------
  |  Branch (1367:9): [True: 0, False: 0]
  |  Branch (1367:24): [True: 0, False: 0]
  ------------------
 1368|      0|      KMP_SYSFAIL("pthread_cond_destroy", status);
  ------------------
  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  |  |  149|      0|              __kmp_msg_null)
  ------------------
 1369|      0|    }
 1370|      0|    status = pthread_mutex_destroy(&th->th.th_suspend_mx.m_mutex);
 1371|      0|    if (status != 0 && status != EBUSY) {
  ------------------
  |  Branch (1371:9): [True: 0, False: 0]
  |  Branch (1371:24): [True: 0, False: 0]
  ------------------
 1372|      0|      KMP_SYSFAIL("pthread_mutex_destroy", status);
  ------------------
  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  |  |  149|      0|              __kmp_msg_null)
  ------------------
 1373|      0|    }
 1374|      0|    --th->th.th_suspend_init_count;
 1375|      0|    KMP_DEBUG_ASSERT(KMP_ATOMIC_LD_RLX(&th->th.th_suspend_init_count) ==
 1376|      0|                     __kmp_fork_count);
 1377|      0|  }
 1378|      1|}
__kmp_yield:
 1714|      1|void __kmp_yield() { sched_yield(); }
__kmp_gtid_set_specific:
 1716|      1|void __kmp_gtid_set_specific(int gtid) {
 1717|      1|  if (__kmp_init_gtid) {
  ------------------
  |  Branch (1717:7): [True: 1, False: 0]
  ------------------
 1718|      1|    int status;
 1719|      1|    status = pthread_setspecific(__kmp_gtid_threadprivate_key,
 1720|      1|                                 (void *)(intptr_t)(gtid + 1));
 1721|      1|    KMP_CHECK_SYSFAIL("pthread_setspecific", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1722|      1|  } else {
 1723|      0|    KA_TRACE(50, ("__kmp_gtid_set_specific: runtime shutdown, returning\n"));
 1724|      0|  }
 1725|      1|}
__kmp_gtid_get_specific:
 1727|      2|int __kmp_gtid_get_specific() {
 1728|      2|  int gtid;
 1729|      2|  if (!__kmp_init_gtid) {
  ------------------
  |  Branch (1729:7): [True: 0, False: 2]
  ------------------
 1730|      0|    KA_TRACE(50, ("__kmp_gtid_get_specific: runtime shutdown, returning "
 1731|      0|                  "KMP_GTID_SHUTDOWN\n"));
 1732|      0|    return KMP_GTID_SHUTDOWN;
  ------------------
  |  | 1001|      0|#define KMP_GTID_SHUTDOWN (-3) /* Library is shutting down */
  ------------------
 1733|      0|  }
 1734|      2|  gtid = (int)(size_t)pthread_getspecific(__kmp_gtid_threadprivate_key);
 1735|      2|  if (gtid == 0) {
  ------------------
  |  Branch (1735:7): [True: 0, False: 2]
  ------------------
 1736|      0|    gtid = KMP_GTID_DNE;
  ------------------
  |  | 1000|      0|#define KMP_GTID_DNE (-2) /* Does not exist */
  ------------------
 1737|      2|  } else {
 1738|      2|    gtid--;
 1739|      2|  }
 1740|      2|  KA_TRACE(50, ("__kmp_gtid_get_specific: key:%d gtid:%d\n",
 1741|      2|                __kmp_gtid_threadprivate_key, gtid));
 1742|      2|  return gtid;
 1743|      2|}
__kmp_read_system_time:
 1784|      1|void __kmp_read_system_time(double *delta) {
 1785|      1|  double t_ns;
 1786|      1|  struct timeval tval;
 1787|      1|  struct timespec stop;
 1788|      1|  int status;
 1789|       |
 1790|      1|  status = gettimeofday(&tval, NULL);
 1791|      1|  KMP_CHECK_SYSFAIL_ERRNO("gettimeofday", status);
  ------------------
  |  |  161|      1|  {                                                                            \
  |  |  162|      1|    if (status != 0) {                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  163|      0|      int error = errno;                                                       \
  |  |  164|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  165|      0|    }                                                                          \
  |  |  166|      1|  }
  ------------------
 1792|      1|  TIMEVAL_TO_TIMESPEC(&tval, &stop);
 1793|      1|  t_ns = (double)(TS2NS(stop) - TS2NS(__kmp_sys_timer_data.start));
  ------------------
  |  |   75|      1|  (((timespec).tv_sec * (long int)1e9) + (timespec).tv_nsec)
  ------------------
                t_ns = (double)(TS2NS(stop) - TS2NS(__kmp_sys_timer_data.start));
  ------------------
  |  |   75|      1|  (((timespec).tv_sec * (long int)1e9) + (timespec).tv_nsec)
  ------------------
 1794|      1|  *delta = (t_ns * 1e-9);
 1795|      1|}
__kmp_runtime_initialize:
 1863|      1|void __kmp_runtime_initialize(void) {
 1864|      1|  int status;
 1865|      1|  pthread_mutexattr_t mutex_attr;
 1866|      1|  pthread_condattr_t cond_attr;
 1867|       |
 1868|      1|  if (__kmp_init_runtime) {
  ------------------
  |  Branch (1868:7): [True: 0, False: 1]
  ------------------
 1869|      0|    return;
 1870|      0|  }
 1871|       |
 1872|      1|#if (KMP_ARCH_X86 || KMP_ARCH_X86_64)
 1873|      1|  if (!__kmp_cpuinfo.initialized) {
  ------------------
  |  Branch (1873:7): [True: 1, False: 0]
  ------------------
 1874|      1|    __kmp_query_cpuid(&__kmp_cpuinfo);
 1875|      1|  }
 1876|      1|#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
 1877|       |
 1878|      1|  __kmp_xproc = __kmp_get_xproc();
 1879|       |
 1880|      1|#if !KMP_32_BIT_ARCH
 1881|      1|  struct rlimit rlim;
 1882|       |  // read stack size of calling thread, save it as default for worker threads;
 1883|       |  // this should be done before reading environment variables
 1884|      1|  status = getrlimit(RLIMIT_STACK, &rlim);
 1885|      1|  if (status == 0) { // success?
  ------------------
  |  Branch (1885:7): [True: 1, False: 0]
  ------------------
 1886|      1|    __kmp_stksize = rlim.rlim_cur;
 1887|      1|    __kmp_check_stksize(&__kmp_stksize); // check value and adjust if needed
 1888|      1|  }
 1889|      1|#endif /* KMP_32_BIT_ARCH */
 1890|       |
 1891|      1|  if (sysconf(_SC_THREADS)) {
  ------------------
  |  Branch (1891:7): [True: 1, False: 0]
  ------------------
 1892|       |
 1893|       |    /* Query the maximum number of threads */
 1894|      1|    __kmp_type_convert(sysconf(_SC_THREAD_THREADS_MAX), &(__kmp_sys_max_nth));
 1895|      1|    if (__kmp_sys_max_nth == -1) {
  ------------------
  |  Branch (1895:9): [True: 1, False: 0]
  ------------------
 1896|       |      /* Unlimited threads for NPTL */
 1897|      1|      __kmp_sys_max_nth = INT_MAX;
 1898|      1|    } else if (__kmp_sys_max_nth <= 1) {
  ------------------
  |  Branch (1898:16): [True: 0, False: 0]
  ------------------
 1899|       |      /* Can't tell, just use PTHREAD_THREADS_MAX */
 1900|      0|      __kmp_sys_max_nth = KMP_MAX_NTH;
  ------------------
  |  | 1143|      0|#define KMP_MAX_NTH INT_MAX
  ------------------
 1901|      0|    }
 1902|       |
 1903|       |    /* Query the minimum stack size */
 1904|      1|    __kmp_sys_min_stksize = sysconf(_SC_THREAD_STACK_MIN);
 1905|      1|    if (__kmp_sys_min_stksize <= 1) {
  ------------------
  |  Branch (1905:9): [True: 0, False: 1]
  ------------------
 1906|      0|      __kmp_sys_min_stksize = KMP_MIN_STKSIZE;
  ------------------
  |  | 1148|      0|#define KMP_MIN_STKSIZE ((size_t)PTHREAD_STACK_MIN)
  ------------------
 1907|      0|    }
 1908|      1|  }
 1909|       |
 1910|       |  /* Set up minimum number of threads to switch to TLS gtid */
 1911|      1|  __kmp_tls_gtid_min = KMP_TLS_GTID_MIN;
  ------------------
  |  | 1266|      1|#define KMP_TLS_GTID_MIN 5
  ------------------
 1912|       |
 1913|      1|  status = pthread_key_create(&__kmp_gtid_threadprivate_key,
 1914|      1|                              __kmp_internal_end_dest);
 1915|      1|  KMP_CHECK_SYSFAIL("pthread_key_create", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1916|      1|  status = pthread_mutexattr_init(&mutex_attr);
 1917|      1|  KMP_CHECK_SYSFAIL("pthread_mutexattr_init", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1918|      1|  status = pthread_mutex_init(&__kmp_wait_mx.m_mutex, &mutex_attr);
 1919|      1|  KMP_CHECK_SYSFAIL("pthread_mutex_init", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1920|      1|  status = pthread_mutexattr_destroy(&mutex_attr);
 1921|      1|  KMP_CHECK_SYSFAIL("pthread_mutexattr_destroy", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1922|      1|  status = pthread_condattr_init(&cond_attr);
 1923|      1|  KMP_CHECK_SYSFAIL("pthread_condattr_init", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1924|      1|  status = pthread_cond_init(&__kmp_wait_cv.c_cond, &cond_attr);
 1925|      1|  KMP_CHECK_SYSFAIL("pthread_cond_init", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1926|      1|  status = pthread_condattr_destroy(&cond_attr);
 1927|      1|  KMP_CHECK_SYSFAIL("pthread_condattr_destroy", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1928|       |#if USE_ITT_BUILD
 1929|       |  __kmp_itt_initialize();
 1930|       |#endif /* USE_ITT_BUILD */
 1931|       |
 1932|      1|  __kmp_init_runtime = TRUE;
  ------------------
  |  | 1280|      1|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      1|#define FALSE 0
  |  |  ------------------
  ------------------
 1933|      1|}
__kmp_runtime_destroy:
 1935|      1|void __kmp_runtime_destroy(void) {
 1936|      1|  int status;
 1937|       |
 1938|      1|  if (!__kmp_init_runtime) {
  ------------------
  |  Branch (1938:7): [True: 0, False: 1]
  ------------------
 1939|      0|    return; // Nothing to do.
 1940|      0|  }
 1941|       |
 1942|       |#if USE_ITT_BUILD
 1943|       |  __kmp_itt_destroy();
 1944|       |#endif /* USE_ITT_BUILD */
 1945|       |
 1946|      1|  status = pthread_key_delete(__kmp_gtid_threadprivate_key);
 1947|      1|  KMP_CHECK_SYSFAIL("pthread_key_delete", status);
  ------------------
  |  |  153|      1|  {                                                                            \
  |  |  154|      1|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      1|  }
  ------------------
 1948|       |
 1949|      1|  status = pthread_mutex_destroy(&__kmp_wait_mx.m_mutex);
 1950|      1|  if (status != 0 && status != EBUSY) {
  ------------------
  |  Branch (1950:7): [True: 0, False: 1]
  |  Branch (1950:22): [True: 0, False: 0]
  ------------------
 1951|      0|    KMP_SYSFAIL("pthread_mutex_destroy", status);
  ------------------
  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  |  |  149|      0|              __kmp_msg_null)
  ------------------
 1952|      0|  }
 1953|      1|  status = pthread_cond_destroy(&__kmp_wait_cv.c_cond);
 1954|      1|  if (status != 0 && status != EBUSY) {
  ------------------
  |  Branch (1954:7): [True: 0, False: 1]
  |  Branch (1954:22): [True: 0, False: 0]
  ------------------
 1955|      0|    KMP_SYSFAIL("pthread_cond_destroy", status);
  ------------------
  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  ------------------
  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  ------------------
  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  ------------------
  |  |  149|      0|              __kmp_msg_null)
  ------------------
 1956|      0|  }
 1957|      1|#if KMP_AFFINITY_SUPPORTED
 1958|      1|  __kmp_affinity_uninitialize();
 1959|      1|#endif
 1960|       |
 1961|      1|  __kmp_init_runtime = FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
 1962|      1|}
_Z14__kmp_now_nsecv:
 1992|      2|kmp_uint64 __kmp_now_nsec() {
 1993|      2|  struct timeval t;
 1994|      2|  gettimeofday(&t, NULL);
 1995|      2|  kmp_uint64 nsec = (kmp_uint64)KMP_NSEC_PER_SEC * (kmp_uint64)t.tv_sec +
  ------------------
  |  |  181|      2|#define KMP_NSEC_PER_SEC 1000000000L
  ------------------
 1996|      2|                    (kmp_uint64)1000 * (kmp_uint64)t.tv_usec;
 1997|      2|  return nsec;
 1998|      2|}
__kmp_initialize_system_tick:
 2002|      1|void __kmp_initialize_system_tick() {
 2003|      1|  kmp_uint64 now, nsec2, diff;
 2004|      1|  kmp_uint64 delay = 100000; // 50~100 usec on most machines.
 2005|      1|  kmp_uint64 nsec = __kmp_now_nsec();
 2006|      1|  kmp_uint64 goal = __kmp_hardware_timestamp() + delay;
 2007|  3.89k|  while ((now = __kmp_hardware_timestamp()) < goal)
  ------------------
  |  Branch (2007:10): [True: 3.89k, False: 1]
  ------------------
 2008|  3.89k|    ;
 2009|      1|  nsec2 = __kmp_now_nsec();
 2010|      1|  diff = nsec2 - nsec;
 2011|      1|  if (diff > 0) {
  ------------------
  |  Branch (2011:7): [True: 1, False: 0]
  ------------------
 2012|      1|    kmp_uint64 tpms = ((kmp_uint64)1e6 * (delay + (now - goal)) / diff);
 2013|      1|    if (tpms > 0)
  ------------------
  |  Branch (2013:9): [True: 1, False: 0]
  ------------------
 2014|      1|      __kmp_ticks_per_msec = tpms;
 2015|      1|  }
 2016|      1|}
z_Linux_util.cpp:_ZL20__kmp_set_stack_infoiP8kmp_info:
  408|      1|static kmp_int32 __kmp_set_stack_info(int gtid, kmp_info_t *th) {
  409|      1|  int stack_data;
  410|      1|#if KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD ||     \
  411|      1|    KMP_OS_HURD
  412|      1|  pthread_attr_t attr;
  413|      1|  int status;
  414|      1|  size_t size = 0;
  415|      1|  void *addr = 0;
  416|       |
  417|       |  /* Always do incremental stack refinement for ubermaster threads since the
  418|       |     initial thread stack range can be reduced by sibling thread creation so
  419|       |     pthread_attr_getstack may cause thread gtid aliasing */
  420|      1|  if (!KMP_UBER_GTID(gtid)) {
  ------------------
  |  Branch (420:7): [True: 0, False: 1]
  ------------------
  421|       |
  422|       |    /* Fetch the real thread attributes */
  423|      0|    status = pthread_attr_init(&attr);
  424|      0|    KMP_CHECK_SYSFAIL("pthread_attr_init", status);
  ------------------
  |  |  153|      0|  {                                                                            \
  |  |  154|      0|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      0|  }
  ------------------
  425|       |#if KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD
  426|       |    status = pthread_attr_get_np(pthread_self(), &attr);
  427|       |    KMP_CHECK_SYSFAIL("pthread_attr_get_np", status);
  428|       |#else
  429|      0|    status = pthread_getattr_np(pthread_self(), &attr);
  430|      0|    KMP_CHECK_SYSFAIL("pthread_getattr_np", status);
  ------------------
  |  |  153|      0|  {                                                                            \
  |  |  154|      0|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      0|  }
  ------------------
  431|      0|#endif
  432|      0|    status = pthread_attr_getstack(&attr, &addr, &size);
  433|      0|    KMP_CHECK_SYSFAIL("pthread_attr_getstack", status);
  ------------------
  |  |  153|      0|  {                                                                            \
  |  |  154|      0|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      0|  }
  ------------------
  434|      0|    KA_TRACE(60,
  435|      0|             ("__kmp_set_stack_info: T#%d pthread_attr_getstack returned size:"
  436|      0|              " %lu, low addr: %p\n",
  437|      0|              gtid, size, addr));
  438|      0|    status = pthread_attr_destroy(&attr);
  439|      0|    KMP_CHECK_SYSFAIL("pthread_attr_destroy", status);
  ------------------
  |  |  153|      0|  {                                                                            \
  |  |  154|      0|    if (error) {                                                               \
  |  |  ------------------
  |  |  |  Branch (154:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  155|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  156|      0|    }                                                                          \
  |  |  157|      0|  }
  ------------------
  440|      0|  }
  441|       |
  442|      1|  if (size != 0 && addr != 0) { // was stack parameter determination successful?
  ------------------
  |  Branch (442:7): [True: 0, False: 1]
  |  Branch (442:20): [True: 0, False: 0]
  ------------------
  443|       |    /* Store the correct base and size */
  444|      0|    TCW_PTR(th->th.th_info.ds.ds_stackbase, (((char *)addr) + size));
  ------------------
  |  | 1157|      0|#define TCW_PTR(a, b) TCW_8((a), (b))
  |  |  ------------------
  |  |  |  | 1132|      0|#define TCW_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
  445|      0|    TCW_PTR(th->th.th_info.ds.ds_stacksize, size);
  ------------------
  |  | 1157|      0|#define TCW_PTR(a, b) TCW_8((a), (b))
  |  |  ------------------
  |  |  |  | 1132|      0|#define TCW_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
  446|      0|    TCW_4(th->th.th_info.ds.ds_stackgrow, FALSE);
  ------------------
  |  | 1128|      0|#define TCW_4(a, b) (a) = (b)
  ------------------
  447|      0|    return TRUE;
  ------------------
  |  | 1280|      0|#define TRUE (!FALSE)
  |  |  ------------------
  |  |  |  | 1279|      0|#define FALSE 0
  |  |  ------------------
  ------------------
  448|      0|  }
  449|      1|#endif /* KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD  \
  450|       |          || KMP_OS_HURD */
  451|       |  /* Use incremental refinement starting from initial conservative estimate */
  452|      1|  TCW_PTR(th->th.th_info.ds.ds_stacksize, 0);
  ------------------
  |  | 1157|      1|#define TCW_PTR(a, b) TCW_8((a), (b))
  |  |  ------------------
  |  |  |  | 1132|      1|#define TCW_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
  453|      1|  TCW_PTR(th->th.th_info.ds.ds_stackbase, &stack_data);
  ------------------
  |  | 1157|      1|#define TCW_PTR(a, b) TCW_8((a), (b))
  |  |  ------------------
  |  |  |  | 1132|      1|#define TCW_8(a, b) (a) = (b)
  |  |  ------------------
  ------------------
  454|      1|  TCW_4(th->th.th_info.ds.ds_stackgrow, TRUE);
  ------------------
  |  | 1128|      1|#define TCW_4(a, b) (a) = (b)
  ------------------
  455|      1|  return FALSE;
  ------------------
  |  | 1279|      1|#define FALSE 0
  ------------------
  456|      1|}
z_Linux_util.cpp:_ZL25__kmp_install_one_handleriPFviEi:
 1113|     11|                                      int parallel_init) {
 1114|     11|  KMP_MB(); // Flush all pending memory write invalidates.
 1115|     11|  KB_TRACE(60,
 1116|     11|           ("__kmp_install_one_handler( %d, ..., %d )\n", sig, parallel_init));
 1117|     11|  if (parallel_init) {
  ------------------
  |  Branch (1117:7): [True: 0, False: 11]
  ------------------
 1118|      0|    struct sigaction new_action;
 1119|      0|    struct sigaction old_action;
 1120|      0|    new_action.sa_handler = handler_func;
 1121|      0|    new_action.sa_flags = 0;
 1122|      0|    sigfillset(&new_action.sa_mask);
 1123|      0|    __kmp_sigaction(sig, &new_action, &old_action);
 1124|      0|    if (old_action.sa_handler == __kmp_sighldrs[sig].sa_handler) {
  ------------------
  |  Branch (1124:9): [True: 0, False: 0]
  ------------------
 1125|      0|      sigaddset(&__kmp_sigset, sig);
 1126|      0|    } else {
 1127|       |      // Restore/keep user's handler if one previously installed.
 1128|      0|      __kmp_sigaction(sig, &old_action, NULL);
 1129|      0|    }
 1130|     11|  } else {
 1131|       |    // Save initial/system signal handlers to see if user handlers installed.
 1132|       |    __kmp_sigaction(sig, NULL, &__kmp_sighldrs[sig]);
 1133|     11|  }
 1134|     11|  KMP_MB(); // Flush all pending memory write invalidates.
 1135|     11|} // __kmp_install_one_handler
z_Linux_util.cpp:_ZL15__kmp_sigactioniPK9sigactionPS_:
 1107|     11|                            struct sigaction *oldact) {
 1108|     11|  int rc = sigaction(signum, act, oldact);
 1109|       |  KMP_CHECK_SYSFAIL_ERRNO("sigaction", rc);
  ------------------
  |  |  161|     11|  {                                                                            \
  |  |  162|     11|    if (status != 0) {                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 11]
  |  |  ------------------
  |  |  163|      0|      int error = errno;                                                       \
  |  |  164|      0|      KMP_SYSFAIL(func, error);                                                \
  |  |  ------------------
  |  |  |  |  148|      0|  __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|#define KMP_MSG(...) __kmp_msg_format(kmp_i18n_msg_##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |                 __kmp_fatal(KMP_MSG(FunctionError, func), KMP_SYSERRCODE(error),             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define KMP_SYSERRCODE(code) __kmp_msg_error_code(code)
  |  |  |  |  ------------------
  |  |  |  |  149|      0|              __kmp_msg_null)
  |  |  ------------------
  |  |  165|      0|    }                                                                          \
  |  |  166|     11|  }
  ------------------
 1110|     11|}
z_Linux_util.cpp:_ZL15__kmp_get_xprocv:
 1805|      1|static int __kmp_get_xproc(void) {
 1806|       |
 1807|      1|  int r = 0;
 1808|       |
 1809|      1|#if KMP_OS_LINUX
 1810|       |
 1811|      1|  __kmp_type_convert(sysconf(_SC_NPROCESSORS_CONF), &(r));
 1812|       |
 1813|       |#elif KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_OPENBSD || \
 1814|       |    KMP_OS_HURD
 1815|       |
 1816|       |  __kmp_type_convert(sysconf(_SC_NPROCESSORS_ONLN), &(r));
 1817|       |
 1818|       |#elif KMP_OS_DARWIN
 1819|       |
 1820|       |  // Bug C77011 High "OpenMP Threads and number of active cores".
 1821|       |
 1822|       |  // Find the number of available CPUs.
 1823|       |  kern_return_t rc;
 1824|       |  host_basic_info_data_t info;
 1825|       |  mach_msg_type_number_t num = HOST_BASIC_INFO_COUNT;
 1826|       |  rc = host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&info, &num);
 1827|       |  if (rc == 0 && num == HOST_BASIC_INFO_COUNT) {
 1828|       |    // Cannot use KA_TRACE() here because this code works before trace support
 1829|       |    // is initialized.
 1830|       |    r = info.avail_cpus;
 1831|       |  } else {
 1832|       |    KMP_WARNING(CantGetNumAvailCPU);
 1833|       |    KMP_INFORM(AssumedNumCPU);
 1834|       |  }
 1835|       |
 1836|       |#else
 1837|       |
 1838|       |#error "Unknown or unsupported OS."
 1839|       |
 1840|       |#endif
 1841|       |
 1842|      1|  return r > 0 ? r : 2; /* guess value of 2 if OS told us 0 */
  ------------------
  |  Branch (1842:10): [True: 1, False: 0]
  ------------------
 1843|       |
 1844|      1|} // __kmp_get_xproc

