LLVMFuzzerTestOneInput:
   60|  4.23k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) {
   61|  4.23k|  assert(Data);
  ------------------
  |  Branch (61:3): [True: 4.23k, False: 0]
  ------------------
   62|       |
   63|  4.23k|  const rawspeed::Buffer buffer(
   64|  4.23k|      Data, rawspeed::implicit_cast<rawspeed::Buffer::size_type>(Size));
   65|       |
   66|  4.23k|  try {
   67|  4.23k|    rawspeed::PARSER parser(buffer);
   68|       |
   69|  4.23k|#if GETDECODER
   70|       |#if DECODE
   71|       |    auto decoder =
   72|       |#endif
   73|  4.23k|        parser.getDecoder();
   74|  4.23k|#endif
   75|       |
   76|       |#if DECODE
   77|       |    decoder->applyCrop = false;
   78|       |    decoder->interpolateBadPixels = false;
   79|       |    decoder->failOnUnknown = false;
   80|       |    // decoder->checkSupport(&metadata);
   81|       |
   82|       |    decoder->decodeRaw();
   83|       |    decoder->decodeMetaData(&metadata);
   84|       |#endif
   85|  4.23k|  } catch (const rawspeed::RawParserException&) {
   86|     26|    return 0;
   87|     26|#if GETDECODER
   88|  2.72k|  } catch (const rawspeed::RawDecoderException&) {
   89|  2.72k|    return 0;
   90|  2.72k|#endif
   91|  2.72k|  } catch (const rawspeed::IOException&) {
   92|  1.25k|    return 0;
   93|       |#if DECODE
   94|       |  } catch (const rawspeed::RawspeedException&) {
   95|       |    return 0;
   96|       |#endif
   97|  1.25k|  }
   98|       |
   99|    229|  return 0;
  100|  4.23k|}

_ZN8rawspeed10Array1DRefIKhEC2EPS1_i:
  104|  3.89M|    : data(data_), numElts(numElts_) {
  105|  3.89M|  establishClassInvariants();
  106|  3.89M|}
_ZNK8rawspeed10Array1DRefIKhE24establishClassInvariantsEv:
   97|  30.1M|Array1DRef<T>::establishClassInvariants() const noexcept {
   98|  30.1M|  invariant(data);
  ------------------
  |  |   27|  30.1M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 30.1M, False: 0]
  ------------------
   99|  30.1M|  invariant(numElts >= 0);
  ------------------
  |  |   27|  30.1M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 30.1M, False: 0]
  ------------------
  100|  30.1M|}
_ZNK8rawspeed10Array1DRefIKhE5beginEv:
  159|  2.41M|template <class T> inline T* Array1DRef<T>::begin() const {
  160|  2.41M|  establishClassInvariants();
  161|  2.41M|  return addressOf(/*eltIdx=*/0);
  162|  2.41M|}
_ZNK8rawspeed10Array1DRefIKhE9addressOfEi:
  133|  3.89M|Array1DRef<T>::addressOf(const int eltIdx) const {
  134|  3.89M|  establishClassInvariants();
  135|  3.89M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  3.89M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (135:3): [True: 3.89M, False: 0]
  ------------------
  136|  3.89M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  3.89M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (136:3): [True: 3.89M, False: 0]
  ------------------
  137|  3.89M|#pragma GCC diagnostic push
  138|  3.89M|#pragma GCC diagnostic ignored "-Wpragmas"
  139|  3.89M|#pragma GCC diagnostic ignored "-Wunknown-warning-option"
  140|  3.89M|#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
  141|  3.89M|  return data + eltIdx;
  142|  3.89M|#pragma GCC diagnostic pop
  143|  3.89M|}
_ZNK8rawspeed10Array1DRefIKhE4sizeEv:
  154|  14.1M|template <class T> inline int Array1DRef<T>::size() const {
  155|  14.1M|  establishClassInvariants();
  156|  14.1M|  return numElts;
  157|  14.1M|}
_ZNK8rawspeed10Array1DRefIKhE7getCropEii:
  110|  1.08M|Array1DRef<T>::getCrop(int offset, int size) const {
  111|  1.08M|  establishClassInvariants();
  112|  1.08M|  invariant(offset >= 0);
  ------------------
  |  |   27|  1.08M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (112:3): [True: 1.08M, False: 0]
  ------------------
  113|  1.08M|  invariant(size >= 0);
  ------------------
  |  |   27|  1.08M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (113:3): [True: 1.08M, False: 0]
  ------------------
  114|  1.08M|  invariant(offset <= numElts);
  ------------------
  |  |   27|  1.08M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (114:3): [True: 1.08M, False: 0]
  ------------------
  115|  1.08M|  invariant(size <= numElts);
  ------------------
  |  |   27|  1.08M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (115:3): [True: 1.08M, False: 0]
  ------------------
  116|  1.08M|  invariant(offset + size <= numElts);
  ------------------
  |  |   27|  1.08M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (116:3): [True: 1.08M, False: 0]
  ------------------
  117|  1.08M|  return {*this, offset, size};
  118|  1.08M|}
_ZNK8rawspeed10Array1DRefIKhEclEi:
  147|     61|Array1DRef<T>::operator()(const int eltIdx) const {
  148|     61|  establishClassInvariants();
  149|     61|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|     61|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (149:3): [True: 61, False: 0]
  ------------------
  150|     61|  invariant(eltIdx < numElts);
  ------------------
  |  |   27|     61|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (150:3): [True: 61, False: 0]
  ------------------
  151|     61|  return *addressOf(eltIdx);
  152|     61|}
_ZNK8rawspeed10Array1DRefIKhE3endEv:
  163|   394k|template <class T> inline T* Array1DRef<T>::end() const {
  164|   394k|  establishClassInvariants();
  165|   394k|  return addressOf(/*eltIdx=*/numElts);
  166|   394k|}

_ZN8rawspeed13implicit_castIjmQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|   481k|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|   481k|#pragma GCC diagnostic push
   34|   481k|#pragma GCC diagnostic ignored "-Wconversion"
   35|   481k|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|   481k|  return value;
   37|   481k|#pragma GCC diagnostic pop
   38|   481k|}
_ZN8rawspeed13implicit_castIijQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|  2.80M|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|  2.80M|#pragma GCC diagnostic push
   34|  2.80M|#pragma GCC diagnostic ignored "-Wconversion"
   35|  2.80M|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|  2.80M|  return value;
   37|  2.80M|#pragma GCC diagnostic pop
   38|  2.80M|}
_ZN8rawspeed13implicit_castIimQaaaaoosr3stdE13is_integral_vIT0_Esr3stdE19is_floating_point_vIS1_Eoosr3stdE13is_integral_vIT_Esr3stdE19is_floating_point_vIS2_Entsr3stdE9is_same_vIS1_S2_EEES2_S1_:
   32|    183|constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value) {
   33|    183|#pragma GCC diagnostic push
   34|    183|#pragma GCC diagnostic ignored "-Wconversion"
   35|    183|#pragma GCC diagnostic ignored "-Wdouble-promotion"
   36|    183|  return value;
   37|    183|#pragma GCC diagnostic pop
   38|    183|}

_ZNK8rawspeed17CroppedArray1DRefIKhE24establishClassInvariantsEv:
   94|  4.34M|CroppedArray1DRef<T>::establishClassInvariants() const noexcept {
   95|  4.34M|  base.establishClassInvariants();
   96|  4.34M|  invariant(offset >= 0);
  ------------------
  |  |   27|  4.34M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (96:3): [True: 4.34M, False: 0]
  ------------------
   97|  4.34M|  invariant(numElts >= 0);
  ------------------
  |  |   27|  4.34M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (97:3): [True: 4.34M, False: 0]
  ------------------
   98|  4.34M|  invariant(offset <= base.size());
  ------------------
  |  |   27|  4.34M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (98:3): [True: 4.34M, False: 0]
  ------------------
   99|  4.34M|  invariant(numElts <= base.size());
  ------------------
  |  |   27|  4.34M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (99:3): [True: 4.34M, False: 0]
  ------------------
  100|  4.34M|  invariant(offset + numElts <= base.size());
  ------------------
  |  |   27|  4.34M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (100:3): [True: 4.34M, False: 0]
  ------------------
  101|  4.34M|}
_ZNK8rawspeed17CroppedArray1DRefIKhE15getAsArray1DRefEv:
   71|  1.08M|  [[nodiscard]] Array1DRef<T> getAsArray1DRef() const {
   72|  1.08M|    return {begin(), size()};
   73|  1.08M|  }
_ZNK8rawspeed17CroppedArray1DRefIKhE5beginEv:
  137|  1.08M|template <class T> inline T* CroppedArray1DRef<T>::begin() const {
  138|  1.08M|  establishClassInvariants();
  139|  1.08M|  return addressOf(/*eltIdx=*/0);
  140|  1.08M|}
_ZNK8rawspeed17CroppedArray1DRefIKhE9addressOfEi:
  152|  1.08M|inline T* CroppedArray1DRef<T>::addressOf(const int eltIdx) const {
  153|  1.08M|  establishClassInvariants();
  154|  1.08M|  invariant(eltIdx >= 0);
  ------------------
  |  |   27|  1.08M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (154:3): [True: 1.08M, False: 0]
  ------------------
  155|  1.08M|  invariant(eltIdx <= numElts);
  ------------------
  |  |   27|  1.08M|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (155:3): [True: 1.08M, False: 0]
  ------------------
  156|  1.08M|  return base.addressOf(offset + eltIdx);
  157|  1.08M|}
_ZNK8rawspeed17CroppedArray1DRefIKhE4sizeEv:
  146|  1.08M|template <class T> inline int CroppedArray1DRef<T>::size() const {
  147|  1.08M|  establishClassInvariants();
  148|  1.08M|  return numElts;
  149|  1.08M|}
_ZN8rawspeed17CroppedArray1DRefIKhEC2ENS_10Array1DRefIS1_EEii:
  107|  1.08M|    : base(base_), offset(offset_), numElts(numElts_) {
  108|  1.08M|  establishClassInvariants();
  109|  1.08M|}

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

_ZN8rawspeed11NORangesSetINS_6BufferEE6insertERKS1_:
   61|  18.6k|  bool insert(const T& newElt) {
   62|  18.6k|    if (rangeIsOverlappingExistingElementOfSortedSet(newElt))
  ------------------
  |  Branch (62:9): [True: 3.84k, False: 14.8k]
  ------------------
   63|  3.84k|      return false;
   64|       |
   65|  14.8k|    auto i = elts.insert(newElt);
   66|  14.8k|    assert(i.second && "Did not insert after all?");
  ------------------
  |  Branch (66:5): [True: 14.8k, False: 0]
  |  Branch (66:5): [True: 14.8k, Folded]
  |  Branch (66:5): [True: 14.8k, False: 0]
  ------------------
   67|  14.8k|    (void)i;
   68|  14.8k|    return true;
   69|  14.8k|  }
_ZNK8rawspeed11NORangesSetINS_6BufferEE44rangeIsOverlappingExistingElementOfSortedSetERKS1_:
   36|  18.6k|  rangeIsOverlappingExistingElementOfSortedSet(const T& newElt) const {
   37|       |    // If there are no elements in set, then the new element
   38|       |    // does not overlap any existing elements.
   39|  18.6k|    if (elts.empty())
  ------------------
  |  Branch (39:9): [True: 5.76k, False: 12.9k]
  ------------------
   40|  5.76k|      return false;
   41|       |
   42|       |    // Find the first element that is not less than the new element.
   43|  12.9k|    auto p =
   44|  12.9k|        std::partition_point(elts.begin(), elts.end(),
   45|  12.9k|                             [newElt](const T& elt) { return elt < newElt; });
   46|       |
   47|       |    // If there is such an element, we must not overlap with it.
   48|  12.9k|    if (p != elts.end() && RangesOverlap(newElt, *p))
  ------------------
  |  Branch (48:9): [True: 6.82k, False: 6.10k]
  |  Branch (48:9): [True: 2.48k, False: 10.4k]
  |  Branch (48:28): [True: 2.48k, False: 4.33k]
  ------------------
   49|  2.48k|      return true;
   50|       |
   51|       |    // Now, is there an element before the element we found?
   52|  10.4k|    if (p == elts.begin())
  ------------------
  |  Branch (52:9): [True: 722, False: 9.72k]
  ------------------
   53|    722|      return false;
   54|       |
   55|       |    // There is. We *also* must not overlap with that element too.
   56|  9.72k|    auto prevBeforeP = std::prev(p);
   57|  9.72k|    return RangesOverlap(newElt, *prevBeforeP);
   58|  10.4k|  }
_ZZNK8rawspeed11NORangesSetINS_6BufferEE44rangeIsOverlappingExistingElementOfSortedSetERKS1_ENKUlS4_E_clES4_:
   45|  25.5k|                             [newElt](const T& elt) { return elt < newElt; });
_ZNK8rawspeed11NORangesSetINS_6BufferEE4sizeEv:
   71|  1.11k|  [[nodiscard]] std::size_t size() const { return elts.size(); }

_ZN8rawspeed8OptionalINS_10ByteStreamEEC2Ev:
   35|  9.24k|  Optional() = default;
_ZN8rawspeed8OptionalINS_10ByteStreamEEaSIS1_Qsr3stdE7same_asITL0__T_EEERS2_OS5_:
   46|  9.20k|  Optional<T>& operator=(U&& value) {
   47|  9.20k|    impl = std::forward<U>(value);
   48|  9.20k|    return *this;
   49|  9.20k|  }
_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|  }
_ZNK8rawspeed8OptionalINS_10ByteStreamEE9has_valueEv:
   85|  19.6k|  [[nodiscard]] bool has_value() const RAWSPEED_READNONE {
   86|  19.6k|    return impl.has_value();
   87|  19.6k|  }
_ZN8rawspeed8OptionalINSt3__15arrayIfLm4EEEEC2IRS3_Qaaaaaantsr3stdE7same_asITL0__NS0_IT_EEEntsr3stdE7same_asIS7_RSA_Entsr3stdE7same_asIS7_OSA_Entsr3stdE7same_asIS7_NS1_8optionalIS8_EEEEEOS8_:
   42|    867|  Optional(U&& value) : impl(std::forward<U>(value)) {}
_ZN8rawspeed8OptionalINS_10Array2DRefIiEEEC2Ev:
   35|    770|  Optional() = default;
_ZN8rawspeed8OptionalIiEC2Ev:
   35|    786|  Optional() = default;
_ZN8rawspeed8OptionalINSt3__15arrayIfLm4EEEEC2Ev:
   35|  1.19k|  Optional() = default;

_ZN8rawspeed8iPoint2DC2Eii:
   41|    770|  constexpr iPoint2D(value_type a, value_type b) : x(a), y(b) {}
_ZN8rawspeed8iPoint2DC2Ev:
   40|  3.08k|  constexpr iPoint2D() = default;

_ZN8rawspeed13RangesOverlapINS_6BufferEEEbRKT_S4_:
   62|  16.5k|constexpr bool RAWSPEED_READNONE RangesOverlap(const T& lhs, const T& rhs) {
   63|  16.5k|  if (&lhs == &rhs)
  ------------------
  |  Branch (63:7): [True: 0, False: 16.5k]
  ------------------
   64|      0|    return true;
   65|       |
   66|  16.5k|  if (std::begin(lhs) == std::begin(rhs))
  ------------------
  |  Branch (66:7): [True: 2.05k, False: 14.4k]
  ------------------
   67|  2.05k|    return true;
   68|       |
   69|  14.4k|  const std::pair<const T&, const T&> ordered =
   70|  14.4k|      std::minmax(lhs, rhs, [](const T& r0, const T& r1) {
   71|  14.4k|        assert(std::begin(r0) != std::begin(r1));
   72|  14.4k|        return std::begin(r0) < std::begin(r1);
   73|  14.4k|      });
   74|       |
   75|  14.4k|  assert(std::begin(ordered.first) < std::begin(ordered.second));
  ------------------
  |  Branch (75:3): [True: 14.4k, False: 0]
  ------------------
   76|  14.4k|  return RangeContains(ordered.first, std::begin(ordered.second));
   77|  14.4k|}
_ZZN8rawspeed13RangesOverlapINS_6BufferEEEbRKT_S4_ENKUlRKS1_S6_E_clES6_S6_:
   70|  14.4k|      std::minmax(lhs, rhs, [](const T& r0, const T& r1) {
   71|  14.4k|        assert(std::begin(r0) != std::begin(r1));
  ------------------
  |  Branch (71:9): [True: 14.4k, False: 0]
  ------------------
   72|  14.4k|        return std::begin(r0) < std::begin(r1);
   73|  14.4k|      });
_ZN8rawspeed13RangeContainsINS_6BufferEPKhEEbRKT_T0_:
   53|  14.4k|constexpr bool RAWSPEED_READNONE RangeContains(const Tr& r, Tv pos) {
   54|  14.4k|  if (pos < std::begin(r))
  ------------------
  |  Branch (54:7): [True: 0, False: 14.4k]
  ------------------
   55|      0|    return false;
   56|       |
   57|  14.4k|  assert(pos >= std::begin(r));
  ------------------
  |  Branch (57:3): [True: 14.4k, False: 0]
  ------------------
   58|  14.4k|  return std::end(r) > pos;
   59|  14.4k|}

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

_ZN8rawspeed10trimSpacesENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  163|  32.8k|inline std::string trimSpaces(std::string_view str) {
  164|       |  // Find the first character position after excluding leading blank spaces
  165|  32.8k|  size_t startpos = str.find_first_not_of(" \t");
  166|       |
  167|       |  // Find the first character position from reverse af
  168|  32.8k|  size_t endpos = str.find_last_not_of(" \t");
  169|       |
  170|       |  // if all spaces or empty return an empty string
  171|  32.8k|  if ((startpos == std::string::npos) || (endpos == std::string::npos))
  ------------------
  |  Branch (171:7): [True: 5.54k, False: 27.3k]
  |  Branch (171:42): [True: 0, False: 27.3k]
  ------------------
  172|  5.54k|    return "";
  173|       |
  174|  27.3k|  str = str.substr(startpos, endpos - startpos + 1);
  175|  27.3k|  return {str.begin(), str.end()};
  176|  32.8k|}
_ZN8rawspeed4isInINS_7TiffTagES1_EEbT_RKSt16initializer_listIT0_E:
  157|  46.3k|                            const std::initializer_list<T2>& list) {
  158|  46.3k|  return std::any_of(list.begin(), list.end(),
  159|  46.3k|                     [value](const T2& t) { return t == value; });
  160|  46.3k|}
_ZZN8rawspeed4isInINS_7TiffTagES1_EEbT_RKSt16initializer_listIT0_EENKUlRKS1_E_clES9_:
  159|   178k|                     [value](const T2& t) { return t == value; });
_ZN8rawspeed4isInINS_7CiffTagES1_EEbT_RKSt16initializer_listIT0_E:
  157|  15.2k|                            const std::initializer_list<T2>& list) {
  158|  15.2k|  return std::any_of(list.begin(), list.end(),
  159|  15.2k|                     [value](const T2& t) { return t == value; });
  160|  15.2k|}
_ZZN8rawspeed4isInINS_7CiffTagES1_EEbT_RKSt16initializer_listIT0_EENKUlRKS1_E_clES9_:
  159|  77.6k|                     [value](const T2& t) { return t == value; });

_ZN8rawspeed8RawImageC2ENSt3__110shared_ptrINS_12RawImageDataEEE:
  257|    770|  explicit RawImage(std::shared_ptr<RawImageData> p) : p_(std::move(p)) {}
_ZN8rawspeed8RawImage6createENS_12RawImageTypeE:
  265|    770|inline RawImage RawImage::create(RawImageType type) {
  266|    770|  switch (type) {
  ------------------
  |  Branch (266:11): [True: 770, False: 0]
  ------------------
  267|    770|  case RawImageType::UINT16:
  ------------------
  |  Branch (267:3): [True: 770, False: 0]
  ------------------
  268|    770|    return RawImage(std::make_shared<RawImageDataU16>());
  269|      0|  case RawImageType::F32:
  ------------------
  |  Branch (269:3): [True: 0, False: 770]
  ------------------
  270|      0|    return RawImage(std::make_shared<RawImageDataFloat>());
  271|    770|  }
  272|      0|  writeLog(DEBUG_PRIO::ERROR, "RawImage::create: Unknown Image type!");
  273|      0|  __builtin_unreachable();
  274|    770|}
_ZN8rawspeed12RawImageDataD2Ev:
  117|    770|  virtual ~RawImageData() = default;
_ZN8rawspeed12RawImageDataC2Ev:
  191|    770|  RawImageData() = default;

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

_ZN8rawspeed17RawspeedException3logEPKc:
   58|  55.6k|  log(const char* msg) {
   59|  55.6k|    writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", msg);
   60|  55.6k|  }
_ZN8rawspeed17RawspeedExceptionC2EPKc:
   67|  55.6k|      : std::runtime_error(msg) {
   68|  55.6k|    log(msg);
   69|  55.6k|  }
_ZN8rawspeed14ThrowExceptionINS_11IOExceptionEEEvPKcz:
   36|  25.3k|    ThrowException(const char* fmt, ...) {
   37|  25.3k|  static constexpr size_t bufSize = 8192;
   38|  25.3k|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|  25.3k|  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|  25.3k|  va_list val;
   49|  25.3k|  va_start(val, fmt);
   50|  25.3k|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|  25.3k|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|  25.3k|  throw T(buf.data());
   54|  25.3k|}
_ZN8rawspeed14ThrowExceptionINS_19TiffParserExceptionEEEvPKcz:
   36|  24.4k|    ThrowException(const char* fmt, ...) {
   37|  24.4k|  static constexpr size_t bufSize = 8192;
   38|  24.4k|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|  24.4k|  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|  24.4k|  va_list val;
   49|  24.4k|  va_start(val, fmt);
   50|  24.4k|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|  24.4k|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|  24.4k|  throw T(buf.data());
   54|  24.4k|}
_ZN8rawspeed14ThrowExceptionINS_19RawDecoderExceptionEEEvPKcz:
   36|  2.81k|    ThrowException(const char* fmt, ...) {
   37|  2.81k|  static constexpr size_t bufSize = 8192;
   38|  2.81k|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|  2.81k|  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|  2.81k|  va_list val;
   49|  2.81k|  va_start(val, fmt);
   50|  2.81k|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|  2.81k|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|  2.81k|  throw T(buf.data());
   54|  2.81k|}
_ZN8rawspeed14ThrowExceptionINS_19FiffParserExceptionEEEvPKcz:
   36|    504|    ThrowException(const char* fmt, ...) {
   37|    504|  static constexpr size_t bufSize = 8192;
   38|    504|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|    504|  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|    504|  va_list val;
   49|    504|  va_start(val, fmt);
   50|    504|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|    504|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|    504|  throw T(buf.data());
   54|    504|}
_ZN8rawspeed14ThrowExceptionINS_19CiffParserExceptionEEEvPKcz:
   36|  2.58k|    ThrowException(const char* fmt, ...) {
   37|  2.58k|  static constexpr size_t bufSize = 8192;
   38|  2.58k|#if defined(HAVE_CXX_THREAD_LOCAL)
   39|  2.58k|  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|  2.58k|  va_list val;
   49|  2.58k|  va_start(val, fmt);
   50|  2.58k|  vsnprintf(buf.data(), sizeof(buf), fmt, val);
   51|       |  va_end(val);
   52|  2.58k|  writeLog(DEBUG_PRIO::EXTRA, "EXCEPTION: %s", buf.data());
   53|  2.58k|  throw T(buf.data());
   54|  2.58k|}

_ZN8rawspeed19AbstractTiffDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   44|    344|      : RawDecoder(file), mRootIFD(std::move(root)) {}

_ZN8rawspeed10ArwDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   61|    770|                                      [[maybe_unused]] Buffer file) {
   62|    770|  const auto id = rootIFD->getID();
   63|    770|  const std::string& make = id.make;
   64|       |
   65|       |  // FIXME: magic
   66|       |
   67|    770|  return make == "SONY";
   68|    770|}

_ZN8rawspeed10ArwDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   43|      2|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10Cr2Decoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   58|    794|                                      [[maybe_unused]] Buffer file) {
   59|    794|  const auto id = rootIFD->getID();
   60|    794|  const std::string& make = id.make;
   61|    794|  const std::string& model = id.model;
   62|       |
   63|       |  // FIXME: magic
   64|       |
   65|    794|  return make == "Canon" ||
  ------------------
  |  Branch (65:10): [True: 8, False: 786]
  ------------------
   66|    786|         (make == "Kodak" && (model == "DCS520C" || model == "DCS560C"));
  ------------------
  |  Branch (66:11): [True: 29, False: 757]
  |  Branch (66:31): [True: 1, False: 28]
  |  Branch (66:53): [True: 2, False: 26]
  ------------------
   67|    794|}

_ZN8rawspeed10Cr2DecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   39|     11|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10CrwDecoder5isCRWENS_6BufferE:
   60|  2.02k|bool CrwDecoder::isCRW(Buffer input) {
   61|  2.02k|  static const std::array<char, 8> magic = {
   62|  2.02k|      {'H', 'E', 'A', 'P', 'C', 'C', 'D', 'R'}};
   63|  2.02k|  static const size_t magic_offset = 6;
   64|  2.02k|  const Buffer data = input.getSubView(magic_offset, magic.size());
   65|  2.02k|  return 0 == memcmp(data.begin(), magic.data(), magic.size());
   66|  2.02k|}
_ZN8rawspeed10CrwDecoderC2ENSt3__110unique_ptrIKNS_7CiffIFDENS1_14default_deleteIS4_EEEENS_6BufferE:
   69|      4|    : RawDecoder(file), mRootIFD(std::move(rootIFD)) {}

_ZN8rawspeed10DcrDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   44|    755|                                      [[maybe_unused]] Buffer file) {
   45|    755|  const auto id = rootIFD->getID();
   46|    755|  const std::string& make = id.make;
   47|       |
   48|       |  // FIXME: magic
   49|       |
   50|    755|  return make == "Kodak";
   51|    755|}

_ZN8rawspeed10DcrDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   41|     26|      : SimpleTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10DcsDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   44|    729|                                      [[maybe_unused]] Buffer file) {
   45|    729|  const auto id = rootIFD->getID();
   46|    729|  const std::string& make = id.make;
   47|       |
   48|       |  // FIXME: magic
   49|       |
   50|    729|  return make == "KODAK";
   51|    729|}

_ZN8rawspeed10DcsDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   43|      1|      : SimpleTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10DngDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   62|  1.88k|    const TiffRootIFD* rootIFD, [[maybe_unused]] Buffer file) {
   63|  1.88k|  return rootIFD->hasEntryRecursive(TiffTag::DNGVERSION);
   64|  1.88k|}
_ZN8rawspeed10DngDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   67|     16|    : AbstractTiffDecoder(std::move(rootIFD), file) {
   68|     16|  if (!mRootIFD->hasEntryRecursive(TiffTag::DNGVERSION))
  ------------------
  |  Branch (68:7): [True: 0, False: 16]
  ------------------
   69|     16|    ThrowRDE("DNG, but version tag is missing. Will not guess.");
  ------------------
  |  |   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__)
  |  |  ------------------
  ------------------
   70|       |
   71|     16|  const auto v =
   72|     16|      mRootIFD->getEntryRecursive(TiffTag::DNGVERSION)->getData().getBuffer(4);
   73|       |
   74|     16|  if (v[0] != 1) {
  ------------------
  |  Branch (74:7): [True: 8, False: 8]
  ------------------
   75|      8|    ThrowRDE("Not a supported DNG image format: v%i.%i.%i.%i",
  ------------------
  |  |   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__)
  |  |  ------------------
  ------------------
   76|      8|             static_cast<int>(v[0]), static_cast<int>(v[1]),
   77|      8|             static_cast<int>(v[2]), static_cast<int>(v[3]));
   78|      8|  }
   79|       |  //  if (v[1] > 4)
   80|       |  //    ThrowRDE("Not a supported DNG image format: v%u.%u.%u.%u", (int)v[0],
   81|       |  //    (int)v[1], (int)v[2], (int)v[3]);
   82|       |
   83|       |  // Prior to v1.1.xxx  fix LJPEG encoding bug
   84|      8|  mFixLjpeg = (v[0] <= 1) && (v[1] < 1);
  ------------------
  |  Branch (84:15): [True: 7, False: 1]
  |  Branch (84:30): [True: 0, False: 7]
  ------------------
   85|      8|}

_ZN8rawspeed10ErfDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   44|    726|                                      [[maybe_unused]] Buffer file) {
   45|    726|  const auto id = rootIFD->getID();
   46|    726|  const std::string& make = id.make;
   47|       |
   48|       |  // FIXME: magic
   49|       |
   50|    726|  return make == "SEIKO EPSON CORP.";
   51|    726|}

_ZN8rawspeed10ErfDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   41|      3|      : SimpleTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10IiqDecoder20isAppropriateDecoderENS_6BufferE:
   59|    879|bool IiqDecoder::isAppropriateDecoder(Buffer file) {
   60|    879|  const DataBuffer db(file, Endianness::little);
   61|       |
   62|       |  // The IIQ magic. Is present for all IIQ raws.
   63|    879|  return db.get<uint32_t>(8) == 0x49494949;
   64|    879|}
_ZN8rawspeed10IiqDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   66|  1.62k|bool IiqDecoder::isAppropriateDecoder(const TiffRootIFD* rootIFD, Buffer file) {
   67|  1.62k|  const auto id = rootIFD->getID();
   68|  1.62k|  const std::string& make = id.make;
   69|       |
   70|  1.62k|  return IiqDecoder::isAppropriateDecoder(file) &&
  ------------------
  |  Branch (70:10): [True: 192, False: 1.42k]
  ------------------
   71|    192|         (make == "Phase One A/S" || make == "Phase One" || make == "Leaf");
  ------------------
  |  Branch (71:11): [True: 2, False: 190]
  |  Branch (71:38): [True: 2, False: 188]
  |  Branch (71:61): [True: 0, False: 188]
  ------------------
   72|  1.62k|}

_ZN8rawspeed10IiqDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   57|      4|      : AbstractTiffDecoder(std::move(rootIFD), file) {}

_ZN8rawspeed10KdcDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   48|    728|                                      [[maybe_unused]] Buffer file) {
   49|    728|  const auto id = rootIFD->getID();
   50|    728|  const std::string& make = id.make;
   51|       |
   52|       |  // FIXME: magic
   53|       |
   54|    728|  return make == "EASTMAN KODAK COMPANY";
   55|    728|}

_ZN8rawspeed10KdcDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   40|      2|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10MefDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   38|    756|                                      [[maybe_unused]] Buffer file) {
   39|    756|  const auto id = rootIFD->getID();
   40|    756|  const std::string& make = id.make;
   41|       |
   42|       |  // FIXME: magic
   43|       |
   44|    756|  return make == "Mamiya-OP Co.,Ltd.";
   45|    756|}

_ZN8rawspeed10MefDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   41|      1|      : SimpleTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10MosDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   55|  1.87k|bool MosDecoder::isAppropriateDecoder(const TiffRootIFD* rootIFD, Buffer file) {
   56|  1.87k|  try {
   57|  1.87k|    const auto id = rootIFD->getID();
   58|  1.87k|    const std::string& make = id.make;
   59|       |
   60|       |    // This is messy. see https://github.com/darktable-org/rawspeed/issues/116
   61|       |    // Old Leafs are MOS, new ones are IIQ. Use IIQ's magic to differentiate.
   62|  1.87k|    return make == "Leaf" && !IiqDecoder::isAppropriateDecoder(file);
  ------------------
  |  Branch (62:12): [True: 81, False: 1.79k]
  |  Branch (62:30): [True: 81, False: 0]
  ------------------
   63|  1.87k|  } catch (const TiffParserException&) {
   64|       |    // Last ditch effort to identify Leaf cameras that don't have a Tiff Make
   65|       |    // set
   66|    993|    const TiffEntry* softwareIFD =
   67|    993|        rootIFD->getEntryRecursive(TiffTag::SOFTWARE);
   68|    993|    if (!softwareIFD)
  ------------------
  |  Branch (68:9): [True: 587, False: 406]
  ------------------
   69|    587|      return false;
   70|       |
   71|    406|    const std::string software = trimSpaces(softwareIFD->getString());
   72|    406|    return software == "Camera Library";
   73|    993|  }
   74|  1.87k|}
_ZN8rawspeed10MosDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   77|    247|    : AbstractTiffDecoder(std::move(rootIFD), file) {
   78|    247|  if (mRootIFD->getEntryRecursive(TiffTag::MAKE)) {
  ------------------
  |  Branch (78:7): [True: 82, False: 165]
  ------------------
   79|     82|    auto id = mRootIFD->getID();
   80|     82|    make = id.make;
   81|     82|    model = id.model;
   82|    165|  } else {
   83|    165|    const TiffEntry* xmp = mRootIFD->getEntryRecursive(TiffTag::XMP);
   84|    165|    if (!xmp)
  ------------------
  |  Branch (84:9): [True: 2, False: 163]
  ------------------
   85|    165|      ThrowRDE("Couldn't find the XMP");
  ------------------
  |  |   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__)
  |  |  ------------------
  ------------------
   86|       |
   87|    165|    assert(xmp != nullptr);
  ------------------
  |  Branch (87:5): [True: 163, False: 0]
  ------------------
   88|    163|    std::string xmpText = xmp->getString();
   89|    163|    make = getXMPTag(xmpText, "Make");
   90|    163|    model = getXMPTag(xmpText, "Model");
   91|    163|  }
   92|    247|}
_ZN8rawspeed10MosDecoder9getXMPTagENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   94|    297|std::string MosDecoder::getXMPTag(std::string_view xmp, std::string_view tag) {
   95|    297|  std::string::size_type start = xmp.find("<tiff:" + std::string(tag) + ">");
   96|    297|  std::string::size_type end = xmp.find("</tiff:" + std::string(tag) + ">");
   97|    297|  if (start == std::string::npos || end == std::string::npos || end <= start)
  ------------------
  |  Branch (97:7): [True: 86, False: 211]
  |  Branch (97:37): [True: 19, False: 192]
  |  Branch (97:65): [True: 9, False: 183]
  ------------------
   98|    297|    ThrowRDE("Couldn't find tag '%s' in the XMP", tag.data());
  ------------------
  |  |   38|    114|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    114|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    114|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    114|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   99|    183|  auto startlen = implicit_cast<int>(tag.size() + 7);
  100|    183|  return std::string(xmp.substr(start + startlen, end - start - startlen));
  101|    297|}

_ZN8rawspeed10MrwDecoderC2ENS_6BufferE:
   45|    422|MrwDecoder::MrwDecoder(Buffer file) : RawDecoder(file) { parseHeader(); }
_ZN8rawspeed10MrwDecoder5isMRWENS_6BufferE:
   47|  4.63k|int MrwDecoder::isMRW(Buffer input) {
   48|  4.63k|  static const std::array<char, 4> magic = {{0x00, 'M', 'R', 'M'}};
   49|  4.63k|  const Buffer data = input.getSubView(0, magic.size());
   50|  4.63k|  return 0 == memcmp(data.begin(), magic.data(), magic.size());
   51|  4.63k|}
_ZN8rawspeed10MrwDecoder11parseHeaderEv:
   53|    422|void MrwDecoder::parseHeader() {
   54|    422|  if (!isMRW(mFile))
  ------------------
  |  Branch (54:7): [True: 0, False: 422]
  ------------------
   55|    422|    ThrowRDE("This isn't actually a MRW file, why are you calling me?");
  ------------------
  |  |   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|    422|  const DataBuffer db(mFile, Endianness::big);
   58|    422|  ByteStream bs(db);
   59|       |
   60|       |  // magic
   61|    422|  bs.skipBytes(4);
   62|       |
   63|       |  // the size of the rest of the header, up to the image data
   64|    422|  const auto headerSize = bs.getU32();
   65|    422|  (void)bs.check(headerSize);
   66|       |
   67|       |  // ... and offset to the image data at the same time
   68|    422|  const auto dataOffset = bs.getPosition() + headerSize;
   69|    422|  assert(bs.getPosition() == 8);
  ------------------
  |  Branch (69:3): [True: 422, False: 0]
  ------------------
   70|       |
   71|       |  // now, let's parse rest of the header.
   72|    422|  bs = bs.getSubStream(0, dataOffset);
   73|    422|  bs.skipBytes(8);
   74|       |
   75|    422|  bool foundPRD = false;
   76|  14.2k|  while (bs.getRemainSize() > 0) {
  ------------------
  |  Branch (76:10): [True: 14.1k, False: 51]
  ------------------
   77|  14.1k|    uint32_t tag = bs.getU32();
   78|  14.1k|    uint32_t len = bs.getU32();
   79|  14.1k|    (void)bs.check(len);
   80|  14.1k|    if (!len)
  ------------------
  |  Branch (80:9): [True: 15, False: 14.1k]
  ------------------
   81|  14.1k|      ThrowRDE("Found entry of zero length, MRW is corrupt.");
  ------------------
  |  |   38|     15|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     15|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     15|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     15|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   82|       |
   83|  14.1k|    const auto origPos = bs.getPosition();
   84|       |
   85|  14.1k|    switch (tag) {
   86|    772|    case 0x505244: { // PRD
  ------------------
  |  Branch (86:5): [True: 772, False: 13.3k]
  ------------------
   87|    772|      foundPRD = true;
   88|    772|      bs.skipBytes(8);          // Version Number
   89|    772|      raw_height = bs.getU16(); // CCD Size Y
   90|    772|      raw_width = bs.getU16();  // CCD Size X
   91|       |
   92|    772|      if (!raw_width || !raw_height || raw_width > 3280 || raw_height > 2456) {
  ------------------
  |  Branch (92:11): [True: 2, False: 770]
  |  Branch (92:25): [True: 1, False: 769]
  |  Branch (92:40): [True: 13, False: 756]
  |  Branch (92:60): [True: 8, False: 748]
  ------------------
   93|     24|        ThrowRDE("Unexpected image dimensions found: (%u; %u)", raw_width,
  ------------------
  |  |   38|     24|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     24|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     24|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     24|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   94|     24|                 raw_height);
   95|     24|      }
   96|       |
   97|    748|      bs.skipBytes(2); // Image Size Y
   98|    748|      bs.skipBytes(2); // Image Size X
   99|       |
  100|    748|      bpp = bs.getByte(); // DataSize
  101|    748|      if (12 != bpp && 16 != bpp)
  ------------------
  |  Branch (101:11): [True: 224, False: 524]
  |  Branch (101:24): [True: 15, False: 209]
  ------------------
  102|    748|        ThrowRDE("Unknown data size");
  ------------------
  |  |   38|     15|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     15|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     15|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     15|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  103|       |
  104|    733|      if ((raw_height * raw_width * bpp) % 8 != 0)
  ------------------
  |  Branch (104:11): [True: 1, False: 732]
  ------------------
  105|    733|        ThrowRDE("Bad combination of image size and raw dimensions.");
  ------------------
  |  |   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|    732|      if (12 != bs.getByte()) // PixelSize
  ------------------
  |  Branch (107:11): [True: 2, False: 730]
  ------------------
  108|    732|        ThrowRDE("Unexpected pixel size");
  ------------------
  |  |   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__)
  |  |  ------------------
  ------------------
  109|       |
  110|    730|      const auto SM = bs.getByte(); // StorageMethod
  111|    730|      if (0x52 != SM && 0x59 != SM)
  ------------------
  |  Branch (111:11): [True: 522, False: 208]
  |  Branch (111:25): [True: 7, False: 515]
  ------------------
  112|    730|        ThrowRDE("Unknown storage method");
  ------------------
  |  |   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__)
  |  |  ------------------
  ------------------
  113|    723|      packed = (0x59 == SM);
  114|       |
  115|    723|      if ((12 == bpp) != packed)
  ------------------
  |  Branch (115:11): [True: 3, False: 720]
  ------------------
  116|    723|        ThrowRDE("Packed/BPP sanity check failed!");
  ------------------
  |  |   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__)
  |  |  ------------------
  ------------------
  117|       |
  118|    720|      bs.skipBytes(1); // Unknown1
  119|    720|      bs.skipBytes(2); // Unknown2
  120|    720|      bs.skipBytes(2); // BayerPattern
  121|    720|      break;
  122|    723|    }
  123|  4.01k|    case 0x545457: // TTW
  ------------------
  |  Branch (123:5): [True: 4.01k, False: 10.1k]
  ------------------
  124|       |      // Base value for offsets needs to be at the beginning of the TIFF block,
  125|       |      // not the file
  126|  4.01k|      rootIFD = TiffParser::parse(nullptr, bs.getBuffer(len));
  127|  4.01k|      break;
  128|    896|    case 0x574247:     // WBG
  ------------------
  |  Branch (128:5): [True: 896, False: 13.2k]
  ------------------
  129|    896|      bs.skipBytes(4); // 4 factors
  130|    896|      std::array<float, 4> wbCoeffs;
  131|    896|      wbCoeffs = {};
  132|    896|      for (auto& wb_coeff : wbCoeffs)
  ------------------
  |  Branch (132:27): [True: 3.54k, False: 896]
  ------------------
  133|  3.54k|        wb_coeff = static_cast<float>(bs.getU16()); // gain
  134|    896|      wb_coeffs = wbCoeffs;
  135|       |
  136|       |      // FIXME?
  137|       |      // Gf = Gr / 2^(6+F)
  138|    896|      break;
  139|  8.25k|    default:
  ------------------
  |  Branch (139:5): [True: 8.25k, False: 5.90k]
  ------------------
  140|       |      // unknown block, let's just ignore
  141|  8.25k|      break;
  142|  14.1k|    }
  143|       |
  144|  13.8k|    bs.setPosition(origPos + len);
  145|  13.8k|  }
  146|       |
  147|     51|  if (!foundPRD)
  ------------------
  |  Branch (147:7): [True: 19, False: 32]
  ------------------
  148|     51|    ThrowRDE("Did not find PRD tag. Image corrupt.");
  ------------------
  |  |   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__)
  |  |  ------------------
  ------------------
  149|       |
  150|       |  // processed all of the header. the image data is directly next
  151|       |
  152|     32|  const auto imageBits = raw_height * raw_width * bpp;
  153|     32|  assert(imageBits > 0);
  ------------------
  |  Branch (153:3): [True: 32, False: 0]
  ------------------
  154|     32|  assert(imageBits % 8 == 0);
  ------------------
  |  Branch (154:3): [True: 32, False: 0]
  ------------------
  155|       |
  156|     32|  imageData = db.getSubView(bs.getPosition(), imageBits / 8);
  157|     32|}

_ZN8rawspeed10NefDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   64|    783|                                      [[maybe_unused]] Buffer file) {
   65|    783|  const auto id = rootIFD->getID();
   66|    783|  const std::string& make = id.make;
   67|       |
   68|       |  // FIXME: magic
   69|       |
   70|    783|  return make == "NIKON CORPORATION" || make == "NIKON";
  ------------------
  |  Branch (70:10): [True: 3, False: 780]
  |  Branch (70:41): [True: 3, False: 777]
  ------------------
   71|    783|}

_ZN8rawspeed10NefDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   45|      6|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10OrfDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   54|    777|                                      [[maybe_unused]] Buffer file) {
   55|    777|  const auto id = rootIFD->getID();
   56|    777|  const std::string& make = id.make;
   57|       |
   58|       |  // FIXME: magic
   59|       |
   60|    777|  return make == "OLYMPUS IMAGING CORP." || make == "OLYMPUS CORPORATION" ||
  ------------------
  |  Branch (60:10): [True: 3, False: 774]
  |  Branch (60:45): [True: 1, False: 773]
  ------------------
   61|    773|         make == "OLYMPUS OPTICAL CO.,LTD" || make == "OM Digital Solutions";
  ------------------
  |  Branch (61:10): [True: 2, False: 771]
  |  Branch (61:47): [True: 1, False: 770]
  ------------------
   62|    777|}

_ZN8rawspeed10OrfDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   43|      7|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10PefDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   48|    768|                                      [[maybe_unused]] Buffer file) {
   49|    768|  const auto id = rootIFD->getID();
   50|    768|  const std::string& make = id.make;
   51|       |
   52|       |  // FIXME: magic
   53|       |
   54|    768|  return make == "PENTAX Corporation" ||
  ------------------
  |  Branch (54:10): [True: 2, False: 766]
  ------------------
   55|    766|         make == "RICOH IMAGING COMPANY, LTD." || make == "PENTAX" ||
  ------------------
  |  Branch (55:10): [True: 2, False: 764]
  |  Branch (55:51): [True: 1, False: 763]
  ------------------
   56|    763|         make == "SAMSUNG TECHWIN";
  ------------------
  |  Branch (56:10): [True: 0, False: 763]
  ------------------
   57|    768|}

_ZN8rawspeed10PefDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   38|      5|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10RafDecoder5isRAFENS_6BufferE:
   52|  3.87k|bool RafDecoder::isRAF(Buffer input) {
   53|  3.87k|  static const std::array<char, 16> magic = {{'F', 'U', 'J', 'I', 'F', 'I', 'L',
   54|  3.87k|                                              'M', 'C', 'C', 'D', '-', 'R', 'A',
   55|  3.87k|                                              'W', ' '}};
   56|  3.87k|  const Buffer data = input.getSubView(0, magic.size());
   57|  3.87k|  return 0 == memcmp(data.begin(), magic.data(), magic.size());
   58|  3.87k|}
_ZN8rawspeed10RafDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   61|    445|                                      [[maybe_unused]] Buffer file) {
   62|    445|  const auto id = rootIFD->getID();
   63|    445|  const std::string& make = id.make;
   64|       |
   65|       |  // FIXME: magic
   66|       |
   67|    445|  return make == "FUJIFILM";
   68|    445|}

_ZN8rawspeed10RafDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   43|      2|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10RawDecoderC2ENS_6BufferE:
   54|    770|RawDecoder::RawDecoder(Buffer file) : mFile(file) {}

_ZN8rawspeed10RawDecoderD2Ev:
   45|    770|  virtual ~RawDecoder() = default;

_ZN8rawspeed10Rw2Decoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   63|    763|                                      [[maybe_unused]] Buffer file) {
   64|    763|  const auto id = rootIFD->getID();
   65|    763|  const std::string& make = id.make;
   66|       |
   67|       |  // FIXME: magic
   68|       |
   69|    763|  return make == "Panasonic" || make == "LEICA" || make == "LEICA CAMERA AG";
  ------------------
  |  Branch (69:10): [True: 1, False: 762]
  |  Branch (69:33): [True: 1, False: 761]
  |  Branch (69:52): [True: 1, False: 760]
  ------------------
   70|    763|}

_ZN8rawspeed10Rw2DecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   41|      3|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed17SimpleTiffDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   42|     31|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10SrwDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   47|    760|                                      [[maybe_unused]] Buffer file) {
   48|    760|  const auto id = rootIFD->getID();
   49|    760|  const std::string& make = id.make;
   50|       |
   51|       |  // FIXME: magic
   52|       |
   53|    760|  return make == "SAMSUNG";
   54|    760|}

_ZN8rawspeed10SrwDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   39|      4|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed10StiDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   43|    723|                                      [[maybe_unused]] Buffer file) {
   44|    723|  const auto id = rootIFD->getID();
   45|    723|  const std::string& make = id.make;
   46|       |
   47|       |  // FIXME: magic
   48|       |
   49|    723|  return make == "Sinar AG";
   50|    723|}

_ZN8rawspeed10StiDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   38|      1|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed14ThreefrDecoder20isAppropriateDecoderEPKNS_11TiffRootIFDENS_6BufferE:
   47|    722|                                          [[maybe_unused]] Buffer file) {
   48|    722|  const auto id = rootIFD->getID();
   49|    722|  const std::string& make = id.make;
   50|       |
   51|       |  // FIXME: magic
   52|       |
   53|    722|  return make == "Hasselblad";
   54|    722|}

_ZN8rawspeed14ThreefrDecoderC2EONSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
   39|      3|      : AbstractTiffDecoder(std::move(root), file) {}

_ZN8rawspeed6BufferC2EPKhj:
   68|  4.58k|      : Buffer(Array1DRef(data_, implicit_cast<int>(size_))) {}
_ZN8rawspeed6BufferC2ENS_10Array1DRefIKhEE:
   62|  1.09M|      : data(data_.begin()), size(data_.size()) {
   63|  1.09M|    assert(data);
  ------------------
  |  Branch (63:5): [True: 1.09M, False: 0]
  ------------------
   64|  1.09M|    assert(!ASan::RegionIsPoisoned(data, size));
  ------------------
  |  Branch (64:5): [True: 1.09M, False: 0]
  ------------------
   65|  1.09M|  }
_ZNK8rawspeed6Buffer15getAsArray1DRefEv:
   70|  2.80M|  [[nodiscard]] Array1DRef<const uint8_t> getAsArray1DRef() const {
   71|  2.80M|    return {data, implicit_cast<int>(size)};
   72|  2.80M|  }
_ZNK8rawspeed6Buffer10getSubViewEjj:
   78|  1.10M|  [[nodiscard]] Buffer getSubView(size_type offset, size_type size_) const {
   79|  1.10M|    if (!isValid(offset, size_))
  ------------------
  |  Branch (79:9): [True: 15.0k, False: 1.08M]
  ------------------
   80|  1.10M|      ThrowIOE("Buffer overflow: image file may be truncated");
  ------------------
  |  |   37|  15.0k|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  15.0k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  15.0k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  15.0k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   81|       |
   82|  1.08M|    return getAsArray1DRef().getCrop(offset, size_).getAsArray1DRef();
   83|  1.10M|  }
_ZNK8rawspeed6Buffer10getSubViewEj:
   85|  2.01k|  [[nodiscard]] Buffer getSubView(size_type offset) const {
   86|  2.01k|    if (!isValid(0, offset))
  ------------------
  |  Branch (86:9): [True: 106, False: 1.90k]
  ------------------
   87|  2.01k|      ThrowIOE("Buffer overflow: image file may be truncated");
  ------------------
  |  |   37|    106|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    106|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    106|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    106|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   88|       |
   89|  1.90k|    size_type newSize = getSize() - offset;
   90|  1.90k|    return getSubView(offset, newSize);
   91|  2.01k|  }
_ZNK8rawspeed6BufferixEj:
   94|     61|  uint8_t operator[](size_type offset) const {
   95|     61|    return getAsArray1DRef()(offset);
   96|     61|  }
_ZNK8rawspeed6Buffer5beginEv:
   99|  1.32M|  [[nodiscard]] const uint8_t* begin() const {
  100|  1.32M|    return getAsArray1DRef().begin();
  101|  1.32M|  }
_ZNK8rawspeed6Buffer3endEv:
  102|   394k|  [[nodiscard]] const uint8_t* end() const { return getAsArray1DRef().end(); }
_ZNK8rawspeed6Buffer7getSizeEv:
  115|  2.95M|  [[nodiscard]] size_type RAWSPEED_READONLY getSize() const { return size; }
_ZNK8rawspeed6Buffer7isValidEjj:
  117|  1.72M|  [[nodiscard]] bool isValid(size_type offset, size_type count = 1) const {
  118|  1.72M|    return static_cast<uint64_t>(offset) + count <=
  119|  1.72M|           static_cast<uint64_t>(getSize());
  120|  1.72M|  }
_ZN8rawspeed10DataBufferC2ENS_6BufferENS_10EndiannessE:
  142|  68.8k|      : Buffer(data_), endianness(endianness_) {}
_ZNK8rawspeed10DataBuffer12getByteOrderEv:
  154|  54.8k|  [[nodiscard]] Endianness getByteOrder() const { return endianness; }
_ZN8rawspeed10DataBuffer12setByteOrderENS_10EndiannessE:
  156|  11.5k|  Endianness setByteOrder(Endianness endianness_) {
  157|  11.5k|    std::swap(endianness, endianness_);
  158|  11.5k|    return endianness_;
  159|  11.5k|  }
_ZN8rawspeedltENS_6BufferES0_:
  124|  58.7k|inline bool operator<(Buffer lhs, Buffer rhs) {
  125|  58.7k|  return std::pair(lhs.begin(), lhs.end()) < std::pair(rhs.begin(), rhs.end());
  126|  58.7k|}
_ZNK8rawspeed10DataBuffer3getIhEET_jj:
  147|  2.20k|  [[nodiscard]] T get(size_type offset, size_type index = 0) const {
  148|  2.20k|    assert(Endianness::unknown != endianness);
  ------------------
  |  Branch (148:5): [True: 2.20k, False: 0]
  ------------------
  149|  2.20k|    assert(Endianness::little == endianness || Endianness::big == endianness);
  ------------------
  |  Branch (149:5): [True: 0, False: 2.20k]
  |  Branch (149:5): [True: 2.20k, False: 0]
  |  Branch (149:5): [True: 2.20k, False: 0]
  ------------------
  150|       |
  151|  2.20k|    return Buffer::get<T>(getHostEndianness() == endianness, offset, index);
  152|  2.20k|  }
_ZNK8rawspeed6Buffer3getIhEET_bjj:
  108|  2.20k|                      size_type index = 0) const {
  109|  2.20k|    const Buffer buf =
  110|  2.20k|        getSubView(offset + (index * static_cast<size_type>(sizeof(T))),
  111|  2.20k|                   static_cast<size_type>(sizeof(T)));
  112|  2.20k|    return getByteSwapped<T>(buf.begin(), !inNativeByteOrder);
  113|  2.20k|  }
_ZNK8rawspeed10DataBuffer3getItEET_jj:
  147|   200k|  [[nodiscard]] T get(size_type offset, size_type index = 0) const {
  148|   200k|    assert(Endianness::unknown != endianness);
  ------------------
  |  Branch (148:5): [True: 200k, False: 0]
  ------------------
  149|   200k|    assert(Endianness::little == endianness || Endianness::big == endianness);
  ------------------
  |  Branch (149:5): [True: 131k, False: 68.6k]
  |  Branch (149:5): [True: 68.6k, False: 0]
  |  Branch (149:5): [True: 200k, False: 0]
  ------------------
  150|       |
  151|   200k|    return Buffer::get<T>(getHostEndianness() == endianness, offset, index);
  152|   200k|  }
_ZNK8rawspeed6Buffer3getItEET_bjj:
  108|   200k|                      size_type index = 0) const {
  109|   200k|    const Buffer buf =
  110|   200k|        getSubView(offset + (index * static_cast<size_type>(sizeof(T))),
  111|   200k|                   static_cast<size_type>(sizeof(T)));
  112|   200k|    return getByteSwapped<T>(buf.begin(), !inNativeByteOrder);
  113|   200k|  }
_ZNK8rawspeed10DataBuffer3getIjEET_jj:
  147|   170k|  [[nodiscard]] T get(size_type offset, size_type index = 0) const {
  148|   170k|    assert(Endianness::unknown != endianness);
  ------------------
  |  Branch (148:5): [True: 170k, False: 0]
  ------------------
  149|   170k|    assert(Endianness::little == endianness || Endianness::big == endianness);
  ------------------
  |  Branch (149:5): [True: 108k, False: 61.8k]
  |  Branch (149:5): [True: 61.8k, False: 0]
  |  Branch (149:5): [True: 170k, False: 0]
  ------------------
  150|       |
  151|   170k|    return Buffer::get<T>(getHostEndianness() == endianness, offset, index);
  152|   170k|  }
_ZNK8rawspeed6Buffer3getIjEET_bjj:
  108|   170k|                      size_type index = 0) const {
  109|   170k|    const Buffer buf =
  110|   170k|        getSubView(offset + (index * static_cast<size_type>(sizeof(T))),
  111|   170k|                   static_cast<size_type>(sizeof(T)));
  112|   170k|    return getByteSwapped<T>(buf.begin(), !inNativeByteOrder);
  113|   170k|  }
_ZN8rawspeed10DataBufferC2Ev:
  139|  63.7k|  DataBuffer() = default;
_ZN8rawspeed6BufferC2Ev:
   58|  64.2k|  Buffer() = default;

_ZN8rawspeed10ByteStreamC2ENS_10DataBufferE:
   50|  93.2k|  explicit ByteStream(DataBuffer buffer) : DataBuffer(buffer) {}
_ZNK8rawspeed10ByteStream12getSubStreamEjj:
   55|  63.5k|                                        size_type size_) const {
   56|  63.5k|    return ByteStream(DataBuffer(getSubView(offset, size_), getByteOrder()));
   57|  63.5k|  }
_ZNK8rawspeed10ByteStream12getSubStreamEj:
   59|    473|  [[nodiscard]] ByteStream getSubStream(size_type offset) const {
   60|    473|    return ByteStream(DataBuffer(getSubView(offset), getByteOrder()));
   61|    473|  }
_ZNK8rawspeed10ByteStream5checkEj:
   63|   374k|  [[nodiscard]] size_type check(size_type bytes) const {
   64|   374k|    if (!isValid(pos, bytes))
  ------------------
  |  Branch (64:9): [True: 10.1k, False: 364k]
  ------------------
   65|   374k|      ThrowIOE("Out of bounds access in ByteStream");
  ------------------
  |  |   37|  10.1k|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  10.1k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  10.1k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  10.1k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   66|   364k|    [[maybe_unused]] Buffer tmp = getSubView(pos, bytes);
   67|   364k|    assert(tmp.getSize() == bytes);
  ------------------
  |  Branch (67:5): [True: 364k, False: 0]
  ------------------
   68|   364k|    assert(!ASan::RegionIsPoisoned(tmp.begin(), tmp.getSize()));
  ------------------
  |  Branch (68:5): [True: 364k, False: 0]
  ------------------
   69|   364k|    return bytes;
   70|   364k|  }
_ZNK8rawspeed10ByteStream11getPositionEv:
   78|   147k|  [[nodiscard]] size_type getPosition() const {
   79|   147k|    invariant(getSize() >= pos);
  ------------------
  |  |   27|   147k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (79:5): [True: 147k, False: 0]
  ------------------
   80|   147k|    (void)check(0);
   81|   147k|    return pos;
   82|   147k|  }
_ZN8rawspeed10ByteStream11setPositionEj:
   83|  89.5k|  void setPosition(size_type newPos) {
   84|  89.5k|    pos = newPos;
   85|  89.5k|    (void)check(0);
   86|  89.5k|  }
_ZNK8rawspeed10ByteStream13getRemainSizeEv:
   87|  51.4k|  [[nodiscard]] size_type RAWSPEED_READONLY getRemainSize() const {
   88|  51.4k|    invariant(getSize() >= pos);
  ------------------
  |  |   27|  51.4k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (88:5): [True: 51.4k, False: 0]
  ------------------
   89|  51.4k|    (void)check(0);
   90|  51.4k|    return getSize() - pos;
   91|  51.4k|  }
_ZNK8rawspeed10ByteStream10peekBufferEj:
  100|  37.0k|  [[nodiscard]] Buffer peekBuffer(size_type size_) const {
  101|  37.0k|    return getSubView(pos, size_);
  102|  37.0k|  }
_ZN8rawspeed10ByteStream9getBufferEj:
  103|  4.03k|  Buffer getBuffer(size_type size_) {
  104|  4.03k|    Buffer ret = peekBuffer(size_);
  105|  4.03k|    pos += size_;
  106|  4.03k|    return ret;
  107|  4.03k|  }
_ZNK8rawspeed10ByteStream10peekStreamEj:
  111|  19.7k|  [[nodiscard]] ByteStream peekStream(size_type size_) const {
  112|  19.7k|    return getSubStream(pos, size_);
  113|  19.7k|  }
_ZN8rawspeed10ByteStream9getStreamEj:
  119|  19.7k|  ByteStream getStream(size_type size_) {
  120|  19.7k|    ByteStream ret = peekStream(size_);
  121|  19.7k|    pos += size_;
  122|  19.7k|    return ret;
  123|  19.7k|  }
_ZN8rawspeed10ByteStream9getStreamEjj:
  124|  1.26k|  ByteStream getStream(size_type nmemb, size_type size_) {
  125|  1.26k|    if (size_ && nmemb > std::numeric_limits<size_type>::max() / size_)
  ------------------
  |  Branch (125:9): [True: 1.26k, False: 0]
  |  Branch (125:18): [True: 0, False: 1.26k]
  ------------------
  126|  1.26k|      ThrowIOE("Integer overflow when calculating stream length");
  ------------------
  |  |   37|      0|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  127|  1.26k|    return getStream(nmemb * size_);
  128|  1.26k|  }
_ZN8rawspeed10ByteStream9skipBytesEj:
  130|  44.7k|  void skipBytes(size_type nbytes) { pos += check(nbytes); }
_ZNK8rawspeed10ByteStream12hasPatternAtENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEj:
  136|   248k|                                  size_type relPos) const {
  137|   248k|    if (!isValid(pos + relPos, implicit_cast<size_type>(pattern.size())))
  ------------------
  |  Branch (137:9): [True: 19.5k, False: 228k]
  ------------------
  138|  19.5k|      return false;
  139|   228k|    auto tmp =
  140|   228k|        getSubView(pos + relPos, implicit_cast<size_type>(pattern.size()));
  141|   228k|    assert(tmp.getSize() == pattern.size());
  ------------------
  |  Branch (141:5): [True: 228k, False: 0]
  ------------------
  142|   228k|    return std::equal(tmp.begin(), tmp.end(), pattern.begin());
  143|   228k|  }
_ZNK8rawspeed10ByteStream9hasPrefixENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  145|   212k|  [[nodiscard]] bool hasPrefix(std::string_view prefix) const {
  146|   212k|    return hasPatternAt(prefix, /*relPos=*/0);
  147|   212k|  }
_ZN8rawspeed10ByteStream10skipPrefixENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  149|  33.5k|  bool skipPrefix(std::string_view prefix) {
  150|  33.5k|    bool has_prefix = hasPrefix(prefix);
  151|  33.5k|    if (has_prefix)
  ------------------
  |  Branch (151:9): [True: 1.42k, False: 32.1k]
  ------------------
  152|  1.42k|      pos += prefix.size();
  153|  33.5k|    return has_prefix;
  154|  33.5k|  }
_ZN8rawspeed10ByteStream7getByteEv:
  186|  2.20k|  uint8_t getByte() { return get<uint8_t>(); }
_ZN8rawspeed10ByteStream6getU16Ev:
  194|   192k|  uint16_t getU16() { return get<uint16_t>(); }
_ZN8rawspeed10ByteStream6getU32Ev:
  196|   164k|  uint32_t getU32() { return get<uint32_t>(); }
_ZNK8rawspeed10ByteStream10peekStringEv:
  199|    526|  [[nodiscard]] std::string_view peekString() const {
  200|    526|    Buffer tmp = peekBuffer(getRemainSize());
  201|    526|    const auto* termIter = std::find(tmp.begin(), tmp.end(), '\0');
  202|    526|    if (termIter == tmp.end())
  ------------------
  |  Branch (202:9): [True: 11, False: 515]
  ------------------
  203|    526|      ThrowIOE("String is not null-terminated");
  ------------------
  |  |   37|     11|#define ThrowIOE(...) ThrowExceptionHelper(rawspeed::IOException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     11|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     11|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     11|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  204|    515|    std::string_view::size_type strlen = std::distance(tmp.begin(), termIter);
  205|    515|    return {reinterpret_cast<const char*>(tmp.begin()), strlen};
  206|    526|  }
_ZNK8rawspeed10ByteStream4peekIhEET_j:
  156|  2.20k|  template <typename T> [[nodiscard]] T peek(size_type i = 0) const {
  157|  2.20k|    return DataBuffer::get<T>(pos, i);
  158|  2.20k|  }
_ZN8rawspeed10ByteStream3getIhEET_v:
  159|  2.20k|  template <typename T> T get() {
  160|  2.20k|    auto ret = peek<T>();
  161|  2.20k|    pos += sizeof(T);
  162|  2.20k|    return ret;
  163|  2.20k|  }
_ZNK8rawspeed10ByteStream4peekItEET_j:
  156|   200k|  template <typename T> [[nodiscard]] T peek(size_type i = 0) const {
  157|   200k|    return DataBuffer::get<T>(pos, i);
  158|   200k|  }
_ZNK8rawspeed10ByteStream4peekIjEET_j:
  156|   169k|  template <typename T> [[nodiscard]] T peek(size_type i = 0) const {
  157|   169k|    return DataBuffer::get<T>(pos, i);
  158|   169k|  }
_ZN8rawspeed10ByteStream3getItEET_v:
  159|   192k|  template <typename T> T get() {
  160|   192k|    auto ret = peek<T>();
  161|   192k|    pos += sizeof(T);
  162|   192k|    return ret;
  163|   192k|  }
_ZN8rawspeed10ByteStream3getIjEET_v:
  159|   164k|  template <typename T> T get() {
  160|   164k|    auto ret = peek<T>();
  161|   164k|    pos += sizeof(T);
  162|   164k|    return ret;
  163|   164k|  }
_ZN8rawspeed10ByteStreamC2Ev:
   48|  63.7k|  ByteStream() = default;

_ZN8rawspeed17getHostEndiannessEv:
   63|   373k|inline Endianness getHostEndianness() {
   64|   373k|#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
   65|   373k|  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|   373k|}
_ZN8rawspeed14getByteSwappedEh:
   76|  2.20k|inline uint8_t getByteSwapped(uint8_t v) { return v; }
_ZN8rawspeed14getByteSwappedEt:
   80|  68.3k|inline uint16_t getByteSwapped(uint16_t v) { return BSWAP16(v); }
  ------------------
  |  |   36|  68.3k|#define BSWAP16(A) __builtin_bswap16(A)
  ------------------
_ZN8rawspeed14getByteSwappedEj:
   84|  61.7k|inline uint32_t getByteSwapped(uint32_t v) { return BSWAP32(v); }
  ------------------
  |  |   37|  61.7k|#define BSWAP32(A) __builtin_bswap32(A)
  ------------------
_ZN8rawspeed14getByteSwappedItEET_PKvb:
  100|   199k|template <typename T> inline T getByteSwapped(const void* data, bool bswap) {
  101|   199k|  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|   199k|  memcpy(&ret, data, sizeof(T));
  106|   199k|  return bswap ? getByteSwapped(ret) : ret;
  ------------------
  |  Branch (106:10): [True: 68.3k, False: 130k]
  ------------------
  107|   199k|}
_ZN8rawspeed14getByteSwappedIjEET_PKvb:
  100|   170k|template <typename T> inline T getByteSwapped(const void* data, bool bswap) {
  101|   170k|  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|   170k|  memcpy(&ret, data, sizeof(T));
  106|   170k|  return bswap ? getByteSwapped(ret) : ret;
  ------------------
  |  Branch (106:10): [True: 61.7k, False: 108k]
  ------------------
  107|   170k|}
_ZN8rawspeed14getByteSwappedIhEET_PKvb:
  100|  2.20k|template <typename T> inline T getByteSwapped(const void* data, bool bswap) {
  101|  2.20k|  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|  2.20k|  memcpy(&ret, data, sizeof(T));
  106|  2.20k|  return bswap ? getByteSwapped(ret) : ret;
  ------------------
  |  Branch (106:10): [True: 2.20k, False: 0]
  ------------------
  107|  2.20k|}

_ZN8rawspeed16ColorFilterArrayC2Ev:
   51|    770|  ColorFilterArray() = default;

_ZN8rawspeed10CiffParserC2ENS_6BufferE:
   41|  2.69k|CiffParser::CiffParser(Buffer inputData) : RawParser(inputData) {}
_ZN8rawspeed10CiffParser9parseDataEv:
   43|  2.69k|void CiffParser::parseData() {
   44|  2.69k|  ByteStream bs(DataBuffer(mInput, Endianness::little));
   45|       |
   46|  2.69k|  if (const uint16_t byteOrder = bs.getU16();
   47|  2.69k|      byteOrder != 0x4949) // "II" / little-endian
  ------------------
  |  Branch (47:7): [True: 671, False: 2.02k]
  ------------------
   48|  2.69k|    ThrowCPE("Not a CIFF file (endianness)");
  ------------------
  |  |   40|    671|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    671|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    671|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    671|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   49|       |
   50|       |  // Offset to the beginning of the CIFF
   51|  2.02k|  const uint32_t headerLength = bs.getU32();
   52|       |
   53|       |  // 8 bytes of Signature
   54|  2.02k|  if (!CrwDecoder::isCRW(mInput))
  ------------------
  |  Branch (54:7): [True: 1.55k, False: 473]
  ------------------
   55|  2.02k|    ThrowCPE("Not a CIFF file (ID)");
  ------------------
  |  |   40|  1.55k|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  1.55k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  1.55k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  1.55k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   56|       |
   57|       |  // *Everything* after the header is the root CIFF Directory
   58|    473|  ByteStream CIFFRootDirectory(bs.getSubStream(headerLength));
   59|    473|  mRootIFD = std::make_unique<CiffIFD>(nullptr, CIFFRootDirectory);
   60|    473|}
_ZN8rawspeed10CiffParser10getDecoderEPKNS_14CameraMetaDataE:
   62|  2.69k|std::unique_ptr<RawDecoder> CiffParser::getDecoder(const CameraMetaData* meta) {
   63|  2.69k|  if (!mRootIFD)
  ------------------
  |  Branch (63:7): [True: 2.69k, False: 0]
  ------------------
   64|  2.69k|    parseData();
   65|       |
   66|  2.69k|  for (const auto potentials(mRootIFD->getIFDsWithTag(CiffTag::MAKEMODEL));
   67|  2.69k|       const auto& potential : potentials) {
  ------------------
  |  Branch (67:30): [True: 540, False: 2.69k]
  ------------------
   68|    540|    const auto* const mm = potential->getEntry(CiffTag::MAKEMODEL);
   69|    540|    const std::string make = trimSpaces(mm->getString());
   70|       |
   71|    540|    if (make == "Canon")
  ------------------
  |  Branch (71:9): [True: 4, False: 536]
  ------------------
   72|      4|      return std::make_unique<CrwDecoder>(std::move(mRootIFD), mInput);
   73|    540|  }
   74|       |
   75|  2.69k|  ThrowCPE("No decoder found. Sorry.");
  ------------------
  |  |   40|  2.69k|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  2.69k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  2.69k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  2.69k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   76|  2.69k|}

_ZN8rawspeed10FiffParserC2ENS_6BufferE:
   44|    794|FiffParser::FiffParser(Buffer inputData) : RawParser(inputData) {}
_ZN8rawspeed10FiffParser9parseDataEv:
   46|    794|void FiffParser::parseData() {
   47|    794|  ByteStream bs(DataBuffer(mInput, Endianness::big));
   48|    794|  bs.skipBytes(0x54);
   49|       |
   50|    794|  uint32_t first_ifd = bs.getU32();
   51|    794|  if (first_ifd >= numeric_limits<uint32_t>::max() - 12)
  ------------------
  |  Branch (51:7): [True: 1, False: 793]
  ------------------
   52|    794|    ThrowFPE("Not Fiff. First IFD too far away");
  ------------------
  |  |   38|      1|  ThrowExceptionHelper(rawspeed::FiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   53|       |
   54|    793|  first_ifd += 12;
   55|       |
   56|    793|  bs.skipBytes(4);
   57|    793|  const uint32_t third_ifd = bs.getU32();
   58|    793|  bs.skipBytes(4);
   59|    793|  const uint32_t second_ifd = bs.getU32();
   60|       |
   61|    793|  rootIFD = TiffParser::parse(nullptr, mInput.getSubView(first_ifd));
   62|    793|  auto subIFD = std::make_unique<TiffIFD>(rootIFD.get());
   63|       |
   64|    793|  if (mInput.isValid(second_ifd)) {
  ------------------
  |  Branch (64:7): [True: 464, False: 329]
  ------------------
   65|       |    // RAW Tiff on newer models, pointer to raw data on older models
   66|       |    // -> so we try parsing as Tiff first and add it as data if parsing fails
   67|    464|    try {
   68|    464|      rootIFD->add(
   69|    464|          TiffParser::parse(rootIFD.get(), mInput.getSubView(second_ifd)));
   70|    464|    } catch (const TiffParserException&) {
   71|       |      // the offset will be interpreted relative to the rootIFD where this
   72|       |      // subIFD gets inserted
   73|       |
   74|     95|      if (second_ifd <= first_ifd)
  ------------------
  |  Branch (74:11): [True: 6, False: 89]
  ------------------
   75|     95|        ThrowFPE("Fiff is corrupted: second IFD is not after the first IFD");
  ------------------
  |  |   38|      6|  ThrowExceptionHelper(rawspeed::FiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      6|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      6|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      6|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   76|       |
   77|     89|      uint32_t rawOffset = second_ifd - first_ifd;
   78|     89|      subIFD->add(std::make_unique<TiffEntryWithData>(
   79|     89|          subIFD.get(), TiffTag::FUJI_STRIPOFFSETS, TiffDataType::OFFSET, 1,
   80|     89|          Buffer(reinterpret_cast<const uint8_t*>(&rawOffset),
   81|     89|                 sizeof(rawOffset))));
   82|     89|      uint32_t max_size = mInput.getSize() - second_ifd;
   83|     89|      subIFD->add(std::make_unique<TiffEntryWithData>(
   84|     89|          subIFD.get(), TiffTag::FUJI_STRIPBYTECOUNTS, TiffDataType::LONG, 1,
   85|     89|          Buffer(reinterpret_cast<const uint8_t*>(&max_size),
   86|     89|                 sizeof(rawOffset))));
   87|     89|    }
   88|    464|  }
   89|       |
   90|    786|  if (mInput.isValid(third_ifd)) {
  ------------------
  |  Branch (90:7): [True: 283, False: 503]
  ------------------
   91|       |    // RAW information IFD on older
   92|       |
   93|       |    // This Fuji directory structure is similar to a Tiff IFD but with two
   94|       |    // differences:
   95|       |    //   a) no type info and b) data is always stored in place.
   96|       |    // 4b: # of entries, for each entry: 2b tag, 2b len, xb data
   97|    283|    ByteStream bytes(DataBuffer(mInput.getSubView(third_ifd), Endianness::big));
   98|    283|    uint32_t entries = bytes.getU32();
   99|       |
  100|    283|    if (entries > 255)
  ------------------
  |  Branch (100:9): [True: 54, False: 229]
  ------------------
  101|    283|      ThrowFPE("Too many entries");
  ------------------
  |  |   38|     54|  ThrowExceptionHelper(rawspeed::FiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     54|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     54|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     54|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  102|       |
  103|  8.43k|    for (uint32_t i = 0; i < entries; i++) {
  ------------------
  |  Branch (103:26): [True: 8.31k, False: 115]
  ------------------
  104|  8.31k|      auto tag = static_cast<TiffTag>(bytes.getU16());
  105|  8.31k|      uint16_t length = bytes.getU16();
  106|       |
  107|  8.31k|      TiffDataType type;
  108|  8.31k|      switch (tag) {
  109|      0|        using enum TiffTag;
  110|    261|      case TiffTag::FUJI_RAWIMAGEFULLSIZE:
  ------------------
  |  Branch (110:7): [True: 261, False: 8.05k]
  ------------------
  111|    464|      case TiffTag::FUJI_RAWIMAGECROPTOPLEFT:
  ------------------
  |  Branch (111:7): [True: 203, False: 8.11k]
  ------------------
  112|    538|      case TiffTag::FUJI_RAWIMAGECROPPEDSIZE:
  ------------------
  |  Branch (112:7): [True: 74, False: 8.24k]
  ------------------
  113|    816|      case TiffTag::FUJIOLDWB:
  ------------------
  |  Branch (113:7): [True: 278, False: 8.03k]
  ------------------
  114|       |        // also 0x121?
  115|    816|        type = TiffDataType::SHORT;
  116|    816|        break;
  117|  7.38k|      default:
  ------------------
  |  Branch (117:7): [True: 7.38k, False: 930]
  ------------------
  118|  7.38k|        type = TiffDataType::UNDEFINED;
  119|  7.38k|        break;
  120|  8.31k|      }
  121|       |
  122|  8.20k|      uint32_t count = type == TiffDataType::SHORT ? length / 2 : length;
  ------------------
  |  Branch (122:24): [True: 816, False: 7.38k]
  ------------------
  123|  8.20k|      subIFD->add(std::make_unique<TiffEntry>(
  124|  8.20k|          subIFD.get(), tag, type, count,
  125|  8.20k|          bytes.getSubStream(bytes.getPosition(), length)));
  126|       |
  127|  8.20k|      bytes.skipBytes(length);
  128|  8.20k|    }
  129|    229|  }
  130|       |
  131|    618|  rootIFD->add(std::move(subIFD));
  132|    618|}
_ZN8rawspeed10FiffParser10getDecoderEPKNS_14CameraMetaDataE:
  134|    794|std::unique_ptr<RawDecoder> FiffParser::getDecoder(const CameraMetaData* meta) {
  135|    794|  if (!rootIFD)
  ------------------
  |  Branch (135:7): [True: 794, False: 0]
  ------------------
  136|    794|    parseData();
  137|       |
  138|       |  // WARNING: do *NOT* fallback to ordinary TIFF parser here!
  139|       |  // All the FIFF raws are '.RAF' (Fujifilm). Do use RafDecoder directly.
  140|       |
  141|    794|  try {
  142|    794|    if (!RafDecoder::isAppropriateDecoder(rootIFD.get(), mInput))
  ------------------
  |  Branch (142:9): [True: 33, False: 761]
  ------------------
  143|    794|      ThrowFPE("Not a FUJIFILM RAF FIFF.");
  ------------------
  |  |   38|     33|  ThrowExceptionHelper(rawspeed::FiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     33|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     33|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     33|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  144|       |
  145|    761|    return std::make_unique<RafDecoder>(std::move(rootIFD), mInput);
  146|    794|  } catch (const TiffParserException&) {
  147|    410|    ThrowFPE("No decoder found. Sorry.");
  ------------------
  |  |   38|    410|  ThrowExceptionHelper(rawspeed::FiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    410|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    410|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    410|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  148|    410|  }
  149|    794|}

_ZN8rawspeed9RawParser10getDecoderEPKNS_14CameraMetaDataE:
   42|  4.23k|std::unique_ptr<RawDecoder> RawParser::getDecoder(const CameraMetaData* meta) {
   43|       |  // We need some data.
   44|       |  // For now it is 104 bytes for RAF/FUJIFIM images.
   45|       |  // FIXME: each decoder/parser should check it on their own.
   46|  4.23k|  if (mInput.getSize() <= 104)
  ------------------
  |  Branch (46:7): [True: 18, False: 4.21k]
  ------------------
   47|  4.23k|    ThrowRDE("File too small");
  ------------------
  |  |   38|     18|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     18|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     18|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     18|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   48|       |
   49|       |  // MRW images are easy to check for, let's try that first
   50|  4.21k|  if (MrwDecoder::isMRW(mInput)) {
  ------------------
  |  Branch (50:7): [True: 422, False: 3.79k]
  ------------------
   51|    422|    try {
   52|    422|      return std::make_unique<MrwDecoder>(mInput);
   53|    422|    } catch (const RawDecoderException&) { // NOLINT(bugprone-empty-catch)
   54|       |      // Yes, just ignore the exception.
   55|     86|    }
   56|    422|  }
   57|       |
   58|       |  // FUJI has pointers to IFD's at fixed byte offsets
   59|       |  // So if camera is FUJI, we cannot use ordinary TIFF parser
   60|  3.87k|  if (RafDecoder::isRAF(mInput)) {
  ------------------
  |  Branch (60:7): [True: 794, False: 3.08k]
  ------------------
   61|    794|    try {
   62|    794|      FiffParser p(mInput);
   63|    794|      return p.getDecoder(meta);
   64|    794|    } catch (const FiffParserException&) { // NOLINT(bugprone-empty-catch)
   65|       |      // Yes, just ignore the exception.
   66|    504|    }
   67|    794|  }
   68|       |
   69|       |  // Ordinary TIFF images
   70|  3.58k|  try {
   71|  3.58k|    TiffParser p(mInput);
   72|  3.58k|    return p.getDecoder(meta);
   73|  3.58k|  } catch (const TiffParserException&) { // NOLINT(bugprone-empty-catch)
   74|       |                                         // Yes, just ignore the exception.
   75|  2.69k|  }
   76|       |
   77|       |  // CIFF images
   78|  2.69k|  try {
   79|  2.69k|    CiffParser p(mInput);
   80|  2.69k|    return p.getDecoder(meta);
   81|  2.69k|  } catch (const CiffParserException&) { // NOLINT(bugprone-empty-catch)
   82|       |                                         // Yes, just ignore the exception.
   83|  2.58k|  }
   84|       |
   85|       |  // Detect camera on filesize (CHDK).
   86|  2.58k|  if (meta != nullptr && meta->hasChdkCamera(mInput.getSize())) {
  ------------------
  |  Branch (86:7): [True: 0, False: 2.58k]
  |  Branch (86:26): [True: 0, False: 0]
  ------------------
   87|      0|    const Camera* c = meta->getChdkCamera(mInput.getSize());
   88|       |
   89|      0|    try {
   90|      0|      return std::make_unique<NakedDecoder>(mInput, c);
   91|      0|    } catch (const RawDecoderException&) { // NOLINT(bugprone-empty-catch)
   92|       |      // Yes, just ignore the exception.
   93|      0|    }
   94|      0|  }
   95|       |
   96|       |  // File could not be decoded, so no further options for now.
   97|  2.58k|  ThrowRDE("No decoder found. Sorry.");
  ------------------
  |  |   38|  2.58k|  ThrowExceptionHelper(rawspeed::RawDecoderException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  2.58k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  2.58k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  2.58k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   98|  2.58k|}

_ZN8rawspeed9RawParserC2ENS_6BufferE:
   33|  11.3k|  explicit RawParser(Buffer inputData) : mInput(inputData) {}
_ZN8rawspeed9RawParserD2Ev:
   34|  3.49k|  virtual ~RawParser() = default;

_ZN8rawspeed10TiffParserC2ENS_6BufferE:
   60|  3.58k|TiffParser::TiffParser(Buffer file) : RawParser(file) {}
_ZN8rawspeed10TiffParser10getDecoderEPKNS_14CameraMetaDataE:
   62|  3.58k|std::unique_ptr<RawDecoder> TiffParser::getDecoder(const CameraMetaData* meta) {
   63|  3.58k|  return TiffParser::makeDecoder(TiffParser::parse(nullptr, mInput), mInput);
   64|  3.58k|}
_ZN8rawspeed10TiffParser5parseEPNS_7TiffIFDENS_6BufferE:
   66|  8.79k|TiffRootIFDOwner TiffParser::parse(TiffIFD* parent, Buffer data) {
   67|  8.79k|  ByteStream bs(DataBuffer(data, Endianness::unknown));
   68|  8.79k|  bs.setByteOrder(getTiffByteOrder(bs, 0, "TIFF header"));
   69|  8.79k|  bs.skipBytes(2);
   70|       |
   71|  8.79k|  if (uint16_t magic = bs.getU16();
   72|  8.79k|      magic != 42 && magic != 0x4f52 && magic != 0x5352 &&
  ------------------
  |  Branch (72:7): [True: 2.08k, False: 6.71k]
  |  Branch (72:22): [True: 1.19k, False: 892]
  |  Branch (72:41): [True: 956, False: 235]
  ------------------
   73|    956|      magic != 0x55) // ORF has 0x4f52/0x5352, RW2 0x55 - Brilliant!
  ------------------
  |  Branch (73:7): [True: 521, False: 435]
  ------------------
   74|  8.79k|    ThrowTPE("Not a TIFF file (magic 42)");
  ------------------
  |  |   39|    521|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    521|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    521|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    521|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   75|       |
   76|  8.27k|  auto root = std::make_unique<TiffRootIFD>(
   77|  8.27k|      parent, nullptr, bs,
   78|  8.27k|      UINT32_MAX); // tell TiffIFD constructor not to parse bs as IFD
   79|       |
   80|  8.27k|  NORangesSet<Buffer> ifds;
   81|       |
   82|  15.4k|  for (uint32_t IFDOffset = bs.getU32(); IFDOffset;
  ------------------
  |  Branch (82:42): [True: 9.02k, False: 6.42k]
  ------------------
   83|  9.02k|       IFDOffset = root->getSubIFDs().back()->getNextIFD()) {
   84|  9.02k|    std::unique_ptr<TiffIFD> subIFD;
   85|  9.02k|    try {
   86|  9.02k|      subIFD = std::make_unique<TiffIFD>(root.get(), &ifds, bs, IFDOffset);
   87|  9.02k|    } catch (const TiffParserException&) {
   88|       |      // This IFD may fail to parse, in which case exit the loop,
   89|       |      // because the offset to the next IFD is last 4 bytes of an IFD,
   90|       |      // and we didn't get them because the IFD failed to parse.
   91|       |      // BUT: don't discard the IFD's that did succeed to parse!
   92|  1.27k|      break;
   93|  1.27k|    }
   94|  9.02k|    assert(subIFD.get());
  ------------------
  |  Branch (94:5): [True: 7.18k, False: 0]
  ------------------
   95|  7.18k|    root->add(std::move(subIFD));
   96|  7.18k|  }
   97|       |
   98|  7.69k|  return root;
   99|  8.27k|}
_ZN8rawspeed10TiffParser11makeDecoderENSt3__110unique_ptrINS_11TiffRootIFDENS1_14default_deleteIS3_EEEENS_6BufferE:
  102|  1.88k|                                                    Buffer data) {
  103|  1.88k|  if (!root)
  ------------------
  |  Branch (103:7): [True: 0, False: 1.88k]
  ------------------
  104|  1.88k|    ThrowTPE("TiffIFD is null.");
  ------------------
  |  |   39|      0|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  105|       |
  106|  15.9k|  for (const auto& decoder : Map) {
  ------------------
  |  Branch (106:28): [True: 15.9k, False: 719]
  ------------------
  107|  15.9k|    checker_t dChecker = nullptr;
  108|  15.9k|    constructor_t dConstructor = nullptr;
  109|       |
  110|  15.9k|    std::tie(dChecker, dConstructor) = decoder;
  111|       |
  112|  15.9k|    assert(dChecker);
  ------------------
  |  Branch (112:5): [True: 15.9k, False: 0]
  ------------------
  113|  15.9k|    assert(dConstructor);
  ------------------
  |  Branch (113:5): [True: 15.9k, False: 0]
  ------------------
  114|       |
  115|  15.9k|    if (!dChecker(root.get(), data))
  ------------------
  |  Branch (115:9): [True: 14.7k, False: 1.16k]
  ------------------
  116|  14.7k|      continue;
  117|       |
  118|  1.16k|    return dConstructor(std::move(root), data);
  119|  15.9k|  }
  120|       |
  121|    719|  ThrowTPE("No decoder found. Sorry.");
  ------------------
  |  |   39|    719|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    719|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    719|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    719|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  122|  1.88k|}
_ZN8rawspeed10TiffParser11constructorINS_10DngDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|     16|                                                    Buffer data) {
  127|     16|  return std::make_unique<Decoder>(std::move(root), data);
  128|     16|}
_ZN8rawspeed10TiffParser11constructorINS_10MosDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|    247|                                                    Buffer data) {
  127|    247|  return std::make_unique<Decoder>(std::move(root), data);
  128|    247|}
_ZN8rawspeed10TiffParser11constructorINS_10IiqDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      4|                                                    Buffer data) {
  127|      4|  return std::make_unique<Decoder>(std::move(root), data);
  128|      4|}
_ZN8rawspeed10TiffParser11constructorINS_10Cr2DecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|     11|                                                    Buffer data) {
  127|     11|  return std::make_unique<Decoder>(std::move(root), data);
  128|     11|}
_ZN8rawspeed10TiffParser11constructorINS_10NefDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      6|                                                    Buffer data) {
  127|      6|  return std::make_unique<Decoder>(std::move(root), data);
  128|      6|}
_ZN8rawspeed10TiffParser11constructorINS_10OrfDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      7|                                                    Buffer data) {
  127|      7|  return std::make_unique<Decoder>(std::move(root), data);
  128|      7|}
_ZN8rawspeed10TiffParser11constructorINS_10ArwDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      2|                                                    Buffer data) {
  127|      2|  return std::make_unique<Decoder>(std::move(root), data);
  128|      2|}
_ZN8rawspeed10TiffParser11constructorINS_10PefDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      5|                                                    Buffer data) {
  127|      5|  return std::make_unique<Decoder>(std::move(root), data);
  128|      5|}
_ZN8rawspeed10TiffParser11constructorINS_10Rw2DecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      3|                                                    Buffer data) {
  127|      3|  return std::make_unique<Decoder>(std::move(root), data);
  128|      3|}
_ZN8rawspeed10TiffParser11constructorINS_10SrwDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      4|                                                    Buffer data) {
  127|      4|  return std::make_unique<Decoder>(std::move(root), data);
  128|      4|}
_ZN8rawspeed10TiffParser11constructorINS_10MefDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      1|                                                    Buffer data) {
  127|      1|  return std::make_unique<Decoder>(std::move(root), data);
  128|      1|}
_ZN8rawspeed10TiffParser11constructorINS_10DcrDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|     26|                                                    Buffer data) {
  127|     26|  return std::make_unique<Decoder>(std::move(root), data);
  128|     26|}
_ZN8rawspeed10TiffParser11constructorINS_10DcsDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      1|                                                    Buffer data) {
  127|      1|  return std::make_unique<Decoder>(std::move(root), data);
  128|      1|}
_ZN8rawspeed10TiffParser11constructorINS_10KdcDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      2|                                                    Buffer data) {
  127|      2|  return std::make_unique<Decoder>(std::move(root), data);
  128|      2|}
_ZN8rawspeed10TiffParser11constructorINS_10ErfDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      3|                                                    Buffer data) {
  127|      3|  return std::make_unique<Decoder>(std::move(root), data);
  128|      3|}
_ZN8rawspeed10TiffParser11constructorINS_10StiDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      1|                                                    Buffer data) {
  127|      1|  return std::make_unique<Decoder>(std::move(root), data);
  128|      1|}
_ZN8rawspeed10TiffParser11constructorINS_14ThreefrDecoderEEENSt3__110unique_ptrINS_10RawDecoderENS3_14default_deleteIS5_EEEEONS4_INS_11TiffRootIFDENS6_IS9_EEEENS_6BufferE:
  126|      3|                                                    Buffer data) {
  127|      3|  return std::make_unique<Decoder>(std::move(root), data);
  128|      3|}

_ZN8rawspeed9CiffEntryC2ENS_10ByteStreamENS_7CiffTagENS_12CiffDataTypeEj:
   43|  9.19k|    : data(data_), tag(tag_), type(type_), count(count_) {}
_ZN8rawspeed9CiffEntry6CreateEPNS_11NORangesSetINS_6BufferEEENS_10ByteStreamES5_:
   46|  9.24k|                            ByteStream valueData, ByteStream dirEntry) {
   47|  9.24k|  uint16_t p = dirEntry.getU16();
   48|       |
   49|  9.24k|  const auto tag = static_cast<CiffTag>(p & 0x3fff);
   50|  9.24k|  uint16_t datalocation = (p & 0xc000);
   51|  9.24k|  const auto type = static_cast<CiffDataType>(p & 0x3800);
   52|       |
   53|  9.24k|  uint32_t data_offset;
   54|  9.24k|  uint32_t bytesize;
   55|       |
   56|  9.24k|  Optional<ByteStream> data;
   57|       |
   58|  9.24k|  switch (datalocation) {
   59|  1.29k|  case 0x0000:
  ------------------
  |  Branch (59:3): [True: 1.29k, False: 7.94k]
  ------------------
   60|       |    // Data is offset in value_data
   61|  1.29k|    bytesize = dirEntry.getU32();
   62|  1.29k|    data_offset = dirEntry.getU32();
   63|  1.29k|    data = valueData.getSubStream(data_offset, bytesize);
   64|  1.29k|    if (!valueDatas->insert(*data))
  ------------------
  |  Branch (64:9): [True: 10, False: 1.28k]
  ------------------
   65|  1.29k|      ThrowCPE("Two valueData's overlap. Raw corrupt!");
  ------------------
  |  |   40|     10|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     10|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     10|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     10|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   66|  1.28k|    break;
   67|  7.92k|  case 0x4000:
  ------------------
  |  Branch (67:3): [True: 7.92k, False: 1.31k]
  ------------------
   68|       |    // Data is stored directly in entry
   69|  7.92k|    data_offset = dirEntry.getPosition();
   70|       |    // Maximum of 8 bytes of data (the size and offset fields)
   71|  7.92k|    bytesize = 8;
   72|  7.92k|    data = dirEntry.getStream(bytesize);
   73|  7.92k|    break;
   74|     19|  default:
  ------------------
  |  Branch (74:3): [True: 19, False: 9.22k]
  ------------------
   75|     19|    ThrowCPE("Don't understand data location 0x%x", datalocation);
  ------------------
  |  |   40|     19|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|     19|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|     19|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|     19|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   76|  9.24k|  }
   77|  9.19k|  invariant(data.has_value());
  ------------------
  |  |   27|  9.19k|#define invariant(expr) assert(expr)
  ------------------
  |  Branch (77:3): [True: 9.19k, False: 0]
  ------------------
   78|       |
   79|       |  // Set the number of items using the shift
   80|  9.19k|  uint32_t count = bytesize >> getElementShift(type);
   81|       |
   82|  9.19k|  return {*data, tag, type, count};
   83|  9.19k|}
_ZN8rawspeed9CiffEntry15getElementShiftENS_12CiffDataTypeE:
   85|  9.19k|uint32_t CiffEntry::getElementShift(CiffDataType type) {
   86|  9.19k|  switch (type) {
   87|      0|    using enum CiffDataType;
   88|  3.77k|  case SHORT:
  ------------------
  |  Branch (88:3): [True: 3.77k, False: 5.41k]
  ------------------
   89|  3.77k|    return 1;
   90|    703|  case LONG:
  ------------------
  |  Branch (90:3): [True: 703, False: 8.48k]
  ------------------
   91|  1.22k|  case MIX:
  ------------------
  |  Branch (91:3): [True: 520, False: 8.67k]
  ------------------
   92|  1.63k|  case SUB1:
  ------------------
  |  Branch (92:3): [True: 412, False: 8.78k]
  ------------------
   93|  2.09k|  case SUB2:
  ------------------
  |  Branch (93:3): [True: 458, False: 8.73k]
  ------------------
   94|  2.09k|    return 2;
   95|  3.32k|  default:
  ------------------
  |  Branch (95:3): [True: 3.32k, False: 5.87k]
  ------------------
   96|       |    // e.g. BYTE or ASCII
   97|  3.32k|    return 0;
   98|  9.19k|  }
   99|  9.19k|}
_ZNK8rawspeed9CiffEntry9getStringEv:
  154|    540|std::string_view CiffEntry::getString() const {
  155|    540|  if (type != CiffDataType::ASCII)
  ------------------
  |  Branch (155:7): [True: 0, False: 540]
  ------------------
  156|    540|    ThrowCPE("Wrong type 0x%x encountered. Expected Ascii",
  ------------------
  |  |   40|      0|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  157|    540|             static_cast<unsigned>(type));
  158|       |
  159|    540|  if (count == 0)
  ------------------
  |  Branch (159:7): [True: 14, False: 526]
  ------------------
  160|     14|    return "";
  161|       |
  162|    526|  return data.peekString();
  163|    540|}

_ZN8rawspeed7CiffIFD13parseIFDEntryEPNS_11NORangesSetINS_6BufferEEENS_10ByteStreamERS5_:
   46|  9.24k|                            ByteStream valueData, ByteStream& dirEntries) {
   47|  9.24k|  assert(valueDatas);
  ------------------
  |  Branch (47:3): [True: 9.24k, False: 0]
  ------------------
   48|       |
   49|  9.24k|  ByteStream dirEntry = dirEntries.getStream(10); // Entry is 10 bytes.
   50|       |
   51|  9.24k|  CiffEntry t = CiffEntry::Create(valueDatas, valueData, dirEntry);
   52|       |
   53|  9.24k|  switch (t.type) {
   54|    412|  case CiffDataType::SUB1:
  ------------------
  |  Branch (54:3): [True: 412, False: 8.83k]
  ------------------
   55|    870|  case CiffDataType::SUB2: {
  ------------------
  |  Branch (55:3): [True: 458, False: 8.78k]
  ------------------
   56|    870|    add(std::make_unique<CiffIFD>(this, t.data));
   57|    870|    break;
   58|    412|  }
   59|       |
   60|  8.32k|  default:
  ------------------
  |  Branch (60:3): [True: 8.32k, False: 921]
  ------------------
   61|       |    // Will we ever look for this entry?
   62|  8.32k|    if (!isIn(t.tag, CiffTagsWeCareAbout))
  ------------------
  |  Branch (62:9): [True: 3.20k, False: 5.12k]
  ------------------
   63|  3.20k|      return;
   64|  5.12k|    add(std::make_unique<CiffEntry>(t));
   65|  9.24k|  }
   66|  9.24k|}
_ZN8rawspeed7CiffIFDC2EPS0_:
   68|  1.30k|CiffIFD::CiffIFD(CiffIFD* const parent_) : parent(parent_) {
   69|  1.30k|  recursivelyCheckSubIFDs(1);
   70|       |  // If we are good (can add this IFD without violating the limits),
   71|       |  // we are still here. However, due to the way we add parsed sub-IFD's (lazy),
   72|       |  // we need to count this IFD right *NOW*, not when adding it at the end.
   73|  1.30k|  recursivelyIncrementSubIFDCount();
   74|  1.30k|}
_ZN8rawspeed7CiffIFDC2EPS0_NS_10ByteStreamE:
   77|  1.30k|    : CiffIFD(parent_) {
   78|  1.30k|  if (directory.getSize() < 4)
  ------------------
  |  Branch (78:7): [True: 5, False: 1.29k]
  ------------------
   79|  1.30k|    ThrowCPE("CIFF directory is too short.");
  ------------------
  |  |   40|      5|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      5|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      5|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      5|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   80|       |
   81|  1.29k|  directory.setPosition(directory.getSize() - 4);
   82|  1.29k|  const uint32_t valueDataSize = directory.getU32();
   83|       |
   84|       |  // The Recursion. Directory entries store data here. May contain IFDs.
   85|  1.29k|  directory.setPosition(0);
   86|  1.29k|  const ByteStream valueData(directory.getStream(valueDataSize));
   87|       |
   88|       |  // count of the Directory entries in this IFD
   89|  1.29k|  const uint16_t entryCount = directory.getU16();
   90|       |
   91|       |  // each entry is 10 bytes
   92|  1.29k|  ByteStream dirEntries(directory.getStream(entryCount, 10));
   93|       |
   94|       |  // IFDData might still contain OtherData until the valueDataSize at the end.
   95|       |  // But we do not care about that.
   96|       |
   97|       |  // Each IFD has it's own valueData area.
   98|       |  // In that area, no two entries may overlap.
   99|  1.29k|  NORangesSet<Buffer> valueDatas;
  100|       |
  101|  10.5k|  for (uint32_t i = 0; i < entryCount; i++)
  ------------------
  |  Branch (101:24): [True: 9.24k, False: 1.29k]
  ------------------
  102|  9.24k|    parseIFDEntry(&valueDatas, valueData, dirEntries);
  103|       |
  104|  1.29k|  assert(valueDatas.size() <= entryCount);
  ------------------
  |  Branch (104:3): [True: 1.11k, False: 182]
  ------------------
  105|  1.29k|  assert(mEntry.size() <= CiffTagsWeCareAbout.size());
  ------------------
  |  Branch (105:3): [True: 1.11k, False: 0]
  ------------------
  106|  1.11k|  assert(mSubIFD.size() == decltype(mSubIFD)::size_type(subIFDCount));
  ------------------
  |  Branch (106:3): [True: 1.11k, False: 0]
  ------------------
  107|  1.11k|  assert(subIFDCount <= subIFDCountRecursive);
  ------------------
  |  Branch (107:3): [True: 1.11k, False: 0]
  ------------------
  108|  1.11k|  assert(mEntry.size() + mSubIFD.size() <= entryCount);
  ------------------
  |  Branch (108:3): [True: 1.11k, False: 0]
  ------------------
  109|  1.11k|}
_ZN8rawspeed7CiffIFD31recursivelyIncrementSubIFDCountEv:
  111|  1.29k|void CiffIFD::recursivelyIncrementSubIFDCount() {
  112|  1.29k|  CiffIFD* p = this->parent;
  113|  1.29k|  if (!p)
  ------------------
  |  Branch (113:7): [True: 433, False: 860]
  ------------------
  114|    433|    return;
  115|       |
  116|    860|  p->subIFDCount++;
  117|       |
  118|  2.55k|  for (; p != nullptr; p = p->parent)
  ------------------
  |  Branch (118:10): [True: 1.69k, False: 860]
  ------------------
  119|  1.69k|    p->subIFDCountRecursive++;
  120|    860|}
_ZNK8rawspeed7CiffIFD12checkSubIFDsEi:
  122|  5.37k|void CiffIFD::checkSubIFDs(int headroom) const {
  123|  5.37k|  int count = headroom + subIFDCount;
  124|  5.37k|  if (!headroom)
  ------------------
  |  Branch (124:7): [True: 2.35k, False: 3.01k]
  ------------------
  125|  5.37k|    assert(count <= CiffIFD::Limits::SubIFDCount);
  ------------------
  |  Branch (125:5): [True: 2.35k, False: 0]
  ------------------
  126|  3.01k|  else if (count > CiffIFD::Limits::SubIFDCount)
  ------------------
  |  Branch (126:12): [True: 3, False: 3.01k]
  ------------------
  127|      3|    ThrowCPE("TIFF IFD has %d SubIFDs", count);
  ------------------
  |  |   40|      3|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      3|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      3|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      3|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  128|       |
  129|  5.37k|  count = headroom + subIFDCountRecursive;
  130|  5.37k|  if (!headroom)
  ------------------
  |  Branch (130:7): [True: 2.35k, False: 3.01k]
  ------------------
  131|  5.37k|    assert(count <= CiffIFD::Limits::RecursiveSubIFDCount);
  ------------------
  |  Branch (131:5): [True: 2.35k, False: 0]
  ------------------
  132|  3.01k|  else if (count > CiffIFD::Limits::RecursiveSubIFDCount)
  ------------------
  |  Branch (132:12): [True: 6, False: 3.01k]
  ------------------
  133|      6|    ThrowCPE("TIFF IFD file has %d SubIFDs (recursively)", count);
  ------------------
  |  |   40|      6|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      6|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      6|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      6|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  134|  5.37k|}
_ZNK8rawspeed7CiffIFD23recursivelyCheckSubIFDsEi:
  136|  2.09k|void CiffIFD::recursivelyCheckSubIFDs(int headroom) const {
  137|  2.09k|  int depth = 0;
  138|  7.46k|  for (const CiffIFD* p = this; p != nullptr;) {
  ------------------
  |  Branch (138:33): [True: 5.37k, False: 2.09k]
  ------------------
  139|  5.37k|    if (!headroom)
  ------------------
  |  Branch (139:9): [True: 2.35k, False: 3.02k]
  ------------------
  140|  5.37k|      assert(depth <= CiffIFD::Limits::Depth);
  ------------------
  |  Branch (140:7): [True: 2.35k, False: 0]
  ------------------
  141|  3.02k|    else if (depth > CiffIFD::Limits::Depth)
  ------------------
  |  Branch (141:14): [True: 1, False: 3.01k]
  ------------------
  142|      1|      ThrowCPE("CiffIFD cascading overflow, found %d level IFD", depth);
  ------------------
  |  |   40|      1|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      1|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      1|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      1|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  143|       |
  144|  5.37k|    p->checkSubIFDs(headroom);
  145|       |
  146|       |    // And step up
  147|  5.37k|    p = p->parent;
  148|  5.37k|    depth++;
  149|  5.37k|  }
  150|  2.09k|}
_ZN8rawspeed7CiffIFD3addENSt3__110unique_ptrIS0_NS1_14default_deleteIS0_EEEE:
  152|    789|void CiffIFD::add(std::unique_ptr<CiffIFD> subIFD) {
  153|    789|  assert(subIFD->parent == this);
  ------------------
  |  Branch (153:3): [True: 789, False: 0]
  ------------------
  154|       |
  155|       |  // We are good, and actually can add this sub-IFD, right?
  156|    789|  subIFD->recursivelyCheckSubIFDs(0);
  157|       |
  158|    789|  mSubIFD.push_back(std::move(subIFD));
  159|    789|}
_ZN8rawspeed7CiffIFD3addENSt3__110unique_ptrINS_9CiffEntryENS1_14default_deleteIS3_EEEE:
  161|  5.12k|void CiffIFD::add(std::unique_ptr<CiffEntry> entry) {
  162|  5.12k|  assert(isIn(entry->tag, CiffTagsWeCareAbout));
  ------------------
  |  Branch (162:3): [True: 5.12k, False: 0]
  ------------------
  163|  5.12k|  mEntry[entry->tag] = std::move(entry);
  164|       |  assert(mEntry.size() <= CiffTagsWeCareAbout.size());
  ------------------
  |  Branch (164:3): [True: 5.12k, False: 0]
  ------------------
  165|  5.12k|}
_ZNK8rawspeed7CiffIFD14getIFDsWithTagENS_7CiffTagE:
  208|    327|vector<const CiffIFD*> CiffIFD::getIFDsWithTag(CiffTag tag) const {
  209|    327|  assert(isIn(tag, CiffTagsWeCareAbout));
  ------------------
  |  Branch (209:3): [True: 327, False: 0]
  ------------------
  210|    327|  return getIFDsWithTagIf(tag,
  211|    327|                          [](const CiffEntry* /*unused*/) { return true; });
  212|    327|}
_ZNK8rawspeed7CiffIFD8getEntryENS_7CiffTagE:
  248|    540|const CiffEntry* CiffIFD::getEntry(CiffTag tag) const {
  249|    540|  assert(isIn(tag, CiffTagsWeCareAbout));
  ------------------
  |  Branch (249:3): [True: 540, False: 0]
  ------------------
  250|       |
  251|    540|  if (const auto found = mEntry.find(tag); found != mEntry.end())
  ------------------
  |  Branch (251:44): [True: 540, False: 0]
  ------------------
  252|    540|    return found->second.get();
  253|       |
  254|      0|  ThrowCPE("Entry 0x%x not found.", static_cast<unsigned>(tag));
  ------------------
  |  |   40|      0|  ThrowExceptionHelper(rawspeed::CiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  255|    540|}
CiffIFD.cpp:_ZNK8rawspeed7CiffIFD16getIFDsWithTagIfIZNKS0_14getIFDsWithTagENS_7CiffTagEE3$_0EENSt3__16vectorIPKS0_NS4_9allocatorIS7_EEEES2_RKT_:
  169|    943|                                                      const Lambda& f) const {
  170|    943|  assert(isIn(tag, CiffTagsWeCareAbout));
  ------------------
  |  Branch (170:3): [True: 943, False: 0]
  ------------------
  171|       |
  172|    943|  std::vector<const CiffIFD*> matchingIFDs;
  173|       |
  174|    943|  if (const auto found = mEntry.find(tag); found != mEntry.end()) {
  ------------------
  |  Branch (174:44): [True: 553, False: 390]
  ------------------
  175|    553|    const auto* const entry = found->second.get();
  176|    553|    if (f(entry))
  ------------------
  |  Branch (176:9): [True: 553, False: 0]
  ------------------
  177|    553|      matchingIFDs.push_back(this);
  178|    553|  }
  179|       |
  180|    943|  for (const auto& i : mSubIFD) {
  ------------------
  |  Branch (180:22): [True: 616, False: 943]
  ------------------
  181|    616|    const auto t = i->getIFDsWithTagIf(tag, f);
  182|    616|    matchingIFDs.insert(matchingIFDs.end(), t.begin(), t.end());
  183|    616|  }
  184|       |
  185|    943|  return matchingIFDs;
  186|    943|}
CiffIFD.cpp:_ZZNK8rawspeed7CiffIFD14getIFDsWithTagENS_7CiffTagEENK3$_0clEPKNS_9CiffEntryE:
  211|    553|                          [](const CiffEntry* /*unused*/) { return true; });

_ZN8rawspeed9TiffEntryC2EPNS_7TiffIFDERNS_10ByteStreamE:
   58|  63.6k|    : parent(parent_), tag(static_cast<TiffTag>(bs.getU16())) {
   59|  63.6k|  const uint16_t numType = bs.getU16();
   60|  63.6k|  if (numType > static_cast<uint16_t>(TiffDataType::OFFSET))
  ------------------
  |  Branch (60:7): [True: 2.28k, False: 61.3k]
  ------------------
   61|  63.6k|    ThrowTPE("Error reading TIFF structure. Unknown Type 0x%x encountered.",
  ------------------
  |  |   39|  2.28k|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  2.28k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  2.28k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  2.28k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   62|  61.3k|             numType);
   63|  61.3k|  type = static_cast<TiffDataType>(numType);
   64|  61.3k|  count = bs.getU32();
   65|       |
   66|       |  // check for count << datashift overflow
   67|  61.3k|  if (count > UINT32_MAX >> datashifts[numType])
  ------------------
  |  Branch (67:7): [True: 111, False: 61.2k]
  ------------------
   68|  61.3k|    ThrowTPE("integer overflow in size calculation.");
  ------------------
  |  |   39|    111|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    111|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    111|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    111|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
   69|       |
   70|  61.2k|  uint32_t byte_size = count << datashifts[numType];
   71|  61.2k|  uint32_t data_offset = UINT32_MAX;
   72|       |
   73|  61.2k|  if (byte_size <= 4) {
  ------------------
  |  Branch (73:7): [True: 14.1k, False: 47.0k]
  ------------------
   74|  14.1k|    data_offset = bs.getPosition();
   75|  14.1k|    data = bs.getSubStream(bs.getPosition(), byte_size);
   76|  14.1k|    bs.skipBytes(4);
   77|  47.0k|  } else {
   78|  47.0k|    data_offset = bs.getU32();
   79|  47.0k|    if (type == TiffDataType::OFFSET ||
  ------------------
  |  Branch (79:9): [True: 677, False: 46.3k]
  |  Branch (79:9): [True: 31.4k, False: 15.5k]
  ------------------
   80|  46.3k|        isIn(tag, {TiffTag::DNGPRIVATEDATA, TiffTag::MAKERNOTE,
  ------------------
  |  Branch (80:9): [True: 30.8k, False: 15.5k]
  ------------------
   81|  46.3k|                   TiffTag::MAKERNOTE_ALT, TiffTag::FUJI_RAW_IFD,
   82|  46.3k|                   TiffTag::SUBIFDS, TiffTag::EXIFIFDPOINTER})) {
   83|       |      // preserve offset for SUB_IFD/EXIF/MAKER_NOTE data
   84|       |      if constexpr ((false)) {
   85|       |        // limit access to range from 0 to data_offset+byte_size
   86|       |        data = bs.getSubStream(data_offset, byte_size);
   87|  31.4k|      } else {
   88|       |        // allow access to whole file, necessary if offsets inside the maker
   89|       |        // note point to outside data, which is forbidden due to the TIFF/DNG
   90|       |        // spec but may happen none the less (see e.g. "old" ORF files like
   91|       |        // EX-1, note: the tags outside of the maker note area are currently not
   92|       |        // used anyway)
   93|  31.4k|        data = bs;
   94|  31.4k|        data.setPosition(data_offset);
   95|  31.4k|        (void)data.check(byte_size);
   96|  31.4k|      }
   97|  31.4k|    } else {
   98|  15.5k|      data = bs.getSubStream(data_offset, byte_size);
   99|  15.5k|    }
  100|  47.0k|  }
  101|  61.2k|}
_ZN8rawspeed9TiffEntryC2EPNS_7TiffIFDENS_7TiffTagENS_12TiffDataTypeEjNS_10ByteStreamE:
  105|  8.28k|    : parent(parent_), data(data_), tag(tag_), type(type_), count(count_) {
  106|       |  // check for count << datashift overflow
  107|  8.28k|  if (count > UINT32_MAX >> datashifts[static_cast<uint32_t>(type)])
  ------------------
  |  Branch (107:7): [True: 0, False: 8.28k]
  ------------------
  108|  8.28k|    ThrowTPE("integer overflow in size calculation.");
  ------------------
  |  |   39|      0|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  109|       |
  110|  8.28k|  uint32_t bytesize = count << datashifts[static_cast<uint32_t>(type)];
  111|       |
  112|  8.28k|  if (data.getSize() != bytesize)
  ------------------
  |  Branch (112:7): [True: 4, False: 8.28k]
  ------------------
  113|  8.28k|    ThrowTPE("data set larger than entry size given");
  ------------------
  |  |   39|      4|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      4|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      4|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      4|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  114|  8.28k|}
_ZN8rawspeed9TiffEntry7setDataENS_10ByteStreamE:
  116|    178|void TiffEntry::setData(ByteStream data_) { data = data_; }
_ZN8rawspeed17TiffEntryWithDataC2EPNS_7TiffIFDENS_7TiffTagENS_12TiffDataTypeEjNS_6BufferE:
  121|    178|    : TiffEntry(parent_, tag_, type_, /*count=*/0, ByteStream()),
  122|    178|      data(mirror.begin(), mirror.end()) {
  123|    178|  setData(ByteStream(DataBuffer(
  124|    178|      Buffer(data.data(), implicit_cast<Buffer::size_type>(data.size())),
  125|    178|      Endianness::little)));
  126|    178|  count = count_;
  127|    178|}
_ZNK8rawspeed9TiffEntry6getU16Ej:
  187|  7.20k|uint16_t TiffEntry::getU16(uint32_t index) const {
  188|  7.20k|  if (type != TiffDataType::SHORT && type != TiffDataType::UNDEFINED)
  ------------------
  |  Branch (188:7): [True: 0, False: 7.20k]
  |  Branch (188:38): [True: 0, False: 0]
  ------------------
  189|  7.20k|    ThrowTPE("Wrong type %u encountered. Expected Short or Undefined on 0x%x",
  ------------------
  |  |   39|      0|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|      0|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|      0|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|      0|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  190|  7.20k|             static_cast<unsigned>(type), static_cast<unsigned>(tag));
  191|       |
  192|  7.20k|  return data.peek<uint16_t>(index);
  193|  7.20k|}
_ZNK8rawspeed9TiffEntry6getU32Ej:
  203|  13.4k|uint32_t TiffEntry::getU32(uint32_t index) const {
  204|  13.4k|  using enum TiffDataType;
  205|  13.4k|  if (type == SHORT)
  ------------------
  |  Branch (205:7): [True: 7.20k, False: 6.27k]
  ------------------
  206|  7.20k|    return getU16(index);
  207|       |
  208|  6.27k|  switch (type) {
  209|    735|  case LONG:
  ------------------
  |  Branch (209:3): [True: 735, False: 5.54k]
  ------------------
  210|  1.28k|  case OFFSET:
  ------------------
  |  Branch (210:3): [True: 552, False: 5.72k]
  ------------------
  211|  2.49k|  case BYTE:
  ------------------
  |  Branch (211:3): [True: 1.20k, False: 5.07k]
  ------------------
  212|  4.59k|  case UNDEFINED:
  ------------------
  |  Branch (212:3): [True: 2.09k, False: 4.18k]
  ------------------
  213|  5.49k|  case RATIONAL:
  ------------------
  |  Branch (213:3): [True: 908, False: 5.37k]
  ------------------
  214|  5.49k|    break;
  215|    779|  default:
  ------------------
  |  Branch (215:3): [True: 779, False: 5.49k]
  ------------------
  216|    779|    ThrowTPE("Wrong type %u encountered. Expected Long, Offset, Rational or "
  ------------------
  |  |   39|    779|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    779|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    779|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    779|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  217|  6.27k|             "Undefined on 0x%x",
  218|  6.27k|             static_cast<unsigned>(type), static_cast<unsigned>(tag));
  219|  6.27k|  }
  220|       |
  221|  5.49k|  return data.peek<uint32_t>(index);
  222|  6.27k|}
_ZNK8rawspeed9TiffEntry9getStringEv:
  296|  32.8k|std::string TiffEntry::getString() const {
  297|  32.8k|  if (type != TiffDataType::ASCII && type != TiffDataType::BYTE)
  ------------------
  |  Branch (297:7): [True: 16.5k, False: 16.2k]
  |  Branch (297:38): [True: 317, False: 16.2k]
  ------------------
  298|  32.8k|    ThrowTPE("Wrong type 0x%x encountered. Expected Ascii or Byte",
  ------------------
  |  |   39|    317|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    317|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    317|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    317|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  299|  32.5k|             static_cast<unsigned>(type));
  300|       |
  301|       |  // *NOT* ByteStream::peekString() !
  302|  32.5k|  Buffer tmp = data.peekBuffer(data.getRemainSize());
  303|  32.5k|  const auto* termIter = std::find(tmp.begin(), tmp.end(), '\0');
  304|  32.5k|  return {reinterpret_cast<const char*>(tmp.begin()),
  305|  32.5k|          reinterpret_cast<const char*>(termIter)};
  306|  32.8k|}

_ZNK8rawspeed9TiffEntry7getDataEv:
  129|  22.6k|  [[nodiscard]] ByteStream getData() const { return data; }
_ZN8rawspeed9TiffEntryD2Ev:
   90|  53.0k|  virtual ~TiffEntry() = default;

_ZN8rawspeed7TiffIFD13parseIFDEntryEPNS_11NORangesSetINS_6BufferEEERNS_10ByteStreamE:
   53|  63.6k|void TiffIFD::parseIFDEntry(NORangesSet<Buffer>* ifds, ByteStream& bs) {
   54|  63.6k|  assert(ifds);
  ------------------
  |  Branch (54:3): [True: 63.6k, False: 0]
  ------------------
   55|       |
   56|  63.6k|  TiffEntryOwner t;
   57|       |
   58|  63.6k|  auto origPos = bs.getPosition();
   59|       |
   60|  63.6k|  try {
   61|  63.6k|    t = std::make_unique<TiffEntry>(this, bs);
   62|  63.6k|  } catch (const IOException&) { // Ignore unparsable entry
   63|       |    // fix probably broken position due to interruption by exception
   64|       |    // i.e. setting it to the next entry.
   65|  16.4k|    bs.setPosition(origPos + 12);
   66|  16.4k|    return;
   67|  16.4k|  }
   68|       |
   69|  44.7k|  try {
   70|  44.7k|    switch (t->tag) {
   71|      0|      using enum TiffTag;
   72|    522|    case DNGPRIVATEDATA:
  ------------------
  |  Branch (72:5): [True: 522, False: 44.2k]
  ------------------
   73|       |      // These are arbitrarily 'rebased', to preserve the offsets, but as it is
   74|       |      // implemented right now, that could trigger UB (pointer arithmetics,
   75|       |      // creating pointer to unowned memory, etc). And since this is not even
   76|       |      // used anywhere right now, let's not
   77|       |      //   add(parseDngPrivateData(ifds, t.get()));
   78|       |      // but just add them as entries. (e.g. ArwDecoder uses WB from them)
   79|    522|      add(std::move(t));
   80|    522|      break;
   81|       |
   82|  13.6k|    case MAKERNOTE:
  ------------------
  |  Branch (82:5): [True: 13.6k, False: 31.1k]
  ------------------
   83|  22.9k|    case MAKERNOTE_ALT:
  ------------------
  |  Branch (83:5): [True: 9.23k, False: 35.5k]
  ------------------
   84|  22.9k|      add(parseMakerNote(ifds, t.get()));
   85|  22.9k|      break;
   86|       |
   87|  5.82k|    case FUJI_RAW_IFD:
  ------------------
  |  Branch (87:5): [True: 5.82k, False: 38.9k]
  ------------------
   88|  7.28k|    case SUBIFDS:
  ------------------
  |  Branch (88:5): [True: 1.45k, False: 43.3k]
  ------------------
   89|  7.84k|    case EXIFIFDPOINTER:
  ------------------
  |  Branch (89:5): [True: 564, False: 44.2k]
  ------------------
   90|  21.3k|      for (uint32_t j = 0; j < t->count; j++)
  ------------------
  |  Branch (90:28): [True: 13.4k, False: 7.84k]
  ------------------
   91|  13.4k|        add(std::make_unique<TiffIFD>(this, ifds, bs, t->getU32(j)));
   92|  7.84k|      break;
   93|       |
   94|  13.4k|    default:
  ------------------
  |  Branch (94:5): [True: 13.4k, False: 31.2k]
  ------------------
   95|  13.4k|      add(std::move(t));
   96|  44.7k|    }
   97|  44.7k|  } catch (const RawspeedException&) { // Unparsable private data are added as
   98|       |                                       // entries
   99|  26.5k|    add(std::move(t));
  100|  26.5k|  }
  101|  44.7k|}
_ZN8rawspeed7TiffIFDC2EPS0_:
  103|  50.5k|TiffIFD::TiffIFD(TiffIFD* parent_) : parent(parent_) {
  104|  50.5k|  recursivelyCheckSubIFDs(1);
  105|       |  // If we are good (can add this IFD without violating the limits),
  106|       |  // we are still here. However, due to the way we add parsed sub-IFD's (lazy),
  107|       |  // we need to count this IFD right *NOW*, not when adding it at the end.
  108|  50.5k|  recursivelyIncrementSubIFDCount();
  109|  50.5k|}
_ZN8rawspeed7TiffIFDC2EPS0_PNS_11NORangesSetINS_6BufferEEENS_10DataBufferEj:
  113|  49.8k|    : TiffIFD(parent_) {
  114|       |  // see TiffParser::parse: UINT32_MAX is used to mark the "virtual" top level
  115|       |  // TiffRootIFD in a tiff file
  116|  49.8k|  if (offset == UINT32_MAX)
  ------------------
  |  Branch (116:7): [True: 13.3k, False: 36.5k]
  ------------------
  117|  13.3k|    return;
  118|       |
  119|  49.8k|  assert(ifds);
  ------------------
  |  Branch (119:3): [True: 25.2k, False: 11.2k]
  ------------------
  120|       |
  121|  25.2k|  ByteStream bs(data);
  122|  25.2k|  bs.setPosition(offset);
  123|       |
  124|       |  // Directory entries in this IFD
  125|  25.2k|  auto numEntries = bs.getU16();
  126|       |
  127|       |  // 2 bytes for entry count
  128|       |  // each entry is 12 bytes
  129|       |  // 4-byte offset to the next IFD at the end
  130|  25.2k|  const auto IFDFullSize = 2 + 4 + (12 * numEntries);
  131|  25.2k|  if (const Buffer IFDBuf(data.getSubView(offset, IFDFullSize));
  132|  25.2k|      !ifds->insert(IFDBuf))
  ------------------
  |  Branch (132:7): [True: 3.83k, False: 21.3k]
  ------------------
  133|  25.2k|    ThrowTPE("Two IFD's overlap. Raw corrupt!");
  ------------------
  |  |   39|  3.83k|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  3.83k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  3.83k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  3.83k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  134|       |
  135|  84.9k|  for (uint32_t i = 0; i < numEntries; i++)
  ------------------
  |  Branch (135:24): [True: 63.6k, False: 21.3k]
  ------------------
  136|  63.6k|    parseIFDEntry(ifds, bs);
  137|       |
  138|  21.3k|  nextIFD = bs.getU32();
  139|  21.3k|}
_ZN8rawspeed7TiffIFD14parseMakerNoteEPNS_11NORangesSetINS_6BufferEEEPKNS_9TiffEntryE:
  143|  22.9k|                                         const TiffEntry* t) {
  144|  22.9k|  assert(ifds);
  ------------------
  |  Branch (144:3): [True: 22.9k, False: 0]
  ------------------
  145|       |
  146|       |  // go up the IFD tree and try to find the MAKE entry on each level.
  147|       |  // we can not go all the way to the top first because this partial tree
  148|       |  // is not yet added to the TiffRootIFD.
  149|  22.9k|  const TiffIFD* p = this;
  150|  22.9k|  const TiffEntry* makeEntry = nullptr;
  151|  76.9k|  while (p && !makeEntry) {
  ------------------
  |  Branch (151:10): [True: 59.7k, False: 17.1k]
  |  Branch (151:15): [True: 53.9k, False: 5.75k]
  ------------------
  152|  53.9k|    makeEntry = p->getEntryRecursive(TiffTag::MAKE);
  153|  53.9k|    p = p->parent;
  154|  53.9k|  }
  155|  22.9k|  std::string make =
  156|  22.9k|      makeEntry != nullptr ? trimSpaces(makeEntry->getString()) : "";
  ------------------
  |  Branch (156:7): [True: 7.51k, False: 15.3k]
  ------------------
  157|       |
  158|  22.9k|  ByteStream bs = t->getData();
  159|       |
  160|       |  // helper function for easy setup of ByteStream buffer for the different maker
  161|       |  // note types 'rebase' means position 0 of new stream equals current position
  162|       |  // 'newPosition' is the position where the IFD starts
  163|       |  // 'byteOrderOffset' is the position where the 2 magic bytes (II/MM) may be
  164|       |  // found 'context' is a string providing error information in case the byte
  165|       |  // order parsing should fail
  166|  22.9k|  auto setup = [&bs](bool rebase, uint32_t newPosition,
  167|  22.9k|                     uint32_t byteOrderOffset = 0,
  168|  22.9k|                     const char* context = nullptr) {
  169|  22.9k|    if (rebase)
  170|  22.9k|      bs = bs.getSubStream(bs.getPosition(), bs.getRemainSize());
  171|  22.9k|    if (context)
  172|  22.9k|      bs.setByteOrder(getTiffByteOrder(bs, byteOrderOffset, context));
  173|  22.9k|    bs.skipBytes(newPosition);
  174|  22.9k|  };
  175|       |
  176|  22.9k|  if (bs.hasPrefix(std::string_view("AOC\0", 4))) {
  ------------------
  |  Branch (176:7): [True: 849, False: 22.0k]
  ------------------
  177|    849|    setup(false, 6, 4, "Pentax makernote");
  178|  22.0k|  } else if (bs.hasPrefix("PENTAX")) {
  ------------------
  |  Branch (178:14): [True: 252, False: 21.8k]
  ------------------
  179|    252|    setup(true, 10, 8, "Pentax makernote");
  180|  21.8k|  } else if (bs.hasPrefix(std::string_view("FUJIFILM\x0c\x00\x00\x00", 12))) {
  ------------------
  |  Branch (180:14): [True: 306, False: 21.5k]
  ------------------
  181|    306|    bs.setByteOrder(Endianness::little);
  182|    306|    setup(true, 12);
  183|  21.5k|  } else if (bs.hasPrefix(std::string_view("Nikon\x00\x02", 7))) {
  ------------------
  |  Branch (183:14): [True: 1.91k, False: 19.5k]
  ------------------
  184|       |    // this is Nikon type 3 maker note format
  185|       |    // TODO: implement Nikon type 1 maker note format
  186|       |    // see http://www.ozhiker.com/electronics/pjmt/jpeg_info/nikon_mn.html
  187|  1.91k|    bs.skipBytes(10);
  188|  1.91k|    setup(true, 8, 0, "Nikon makernote");
  189|  19.5k|  } else if (bs.hasPrefix("OLYMPUS")) { // new Olympus
  ------------------
  |  Branch (189:14): [True: 276, False: 19.3k]
  ------------------
  190|    276|    setup(true, 12);
  191|  19.3k|  } else if (bs.hasPrefix("OLYMP")) { // old Olympus
  ------------------
  |  Branch (191:14): [True: 864, False: 18.4k]
  ------------------
  192|    864|    setup(true, 8);
  193|  18.4k|  } else if (bs.hasPrefix("OM SYSTEM")) { // ex Olympus
  ------------------
  |  Branch (193:14): [True: 201, False: 18.2k]
  ------------------
  194|    201|    setup(true, 16);
  195|  18.2k|  } else if (bs.hasPrefix("EPSON")) {
  ------------------
  |  Branch (195:14): [True: 203, False: 18.0k]
  ------------------
  196|    203|    setup(false, 8);
  197|  18.0k|  } else if (bs.hasPrefix("Apple iOS")) {
  ------------------
  |  Branch (197:14): [True: 0, False: 18.0k]
  ------------------
  198|      0|    setup(true, 14, 12, "Apple makernote");
  199|  18.0k|  } else if (bs.hasPatternAt("Exif", 6)) {
  ------------------
  |  Branch (199:14): [True: 383, False: 17.6k]
  ------------------
  200|       |    // TODO: for none of the rawsamples.ch files from Panasonic is this true,
  201|       |    // instead their MakerNote start with "Panasonic" Panasonic has the word
  202|       |    // Exif at byte 6, a complete Tiff header starts at byte 12 This TIFF is 0
  203|       |    // offset based
  204|    383|    setup(false, 20, 12, "Panosonic makernote");
  205|  17.6k|  } else if (make == "SAMSUNG") {
  ------------------
  |  Branch (205:14): [True: 392, False: 17.2k]
  ------------------
  206|       |    // Samsung has no identification in its MakerNote but starts with the IFD
  207|       |    // right away
  208|    392|    setup(true, 0);
  209|  17.2k|  } else {
  210|       |    // cerr << "default MakerNote from " << make << endl; // Canon, Nikon (type
  211|       |    // 2), Sony, Minolta, Ricoh, Leica, Hasselblad, etc.
  212|       |
  213|       |    // At least one MAKE has not been handled explicitly and starts its
  214|       |    // MakerNote with an endian prefix: Kodak
  215|  17.2k|    if (bs.skipPrefix("II")) {
  ------------------
  |  Branch (215:9): [True: 401, False: 16.8k]
  ------------------
  216|    401|      bs.setByteOrder(Endianness::little);
  217|  16.8k|    } else if (bs.skipPrefix("MM")) {
  ------------------
  |  Branch (217:16): [True: 1.02k, False: 15.8k]
  ------------------
  218|  1.02k|      bs.setByteOrder(Endianness::big);
  219|  1.02k|    }
  220|  17.2k|  }
  221|       |
  222|       |  // Attempt to parse the rest as an IFD
  223|  22.9k|  return std::make_unique<TiffRootIFD>(this, ifds, bs, bs.getPosition());
  224|  22.9k|}
_ZNK8rawspeed7TiffIFD17getEntryRecursiveENS_7TiffTagE:
  246|   150k|TiffEntry* RAWSPEED_READONLY TiffIFD::getEntryRecursive(TiffTag tag) const {
  247|   150k|  if (auto i = entries.find(tag); i != entries.end()) {
  ------------------
  |  Branch (247:35): [True: 33.3k, False: 117k]
  ------------------
  248|  33.3k|    return i->second.get();
  249|  33.3k|  }
  250|   117k|  for (const auto& j : subIFDs) {
  ------------------
  |  Branch (250:22): [True: 60.6k, False: 87.8k]
  ------------------
  251|  60.6k|    TiffEntry* entry = j->getEntryRecursive(tag);
  252|  60.6k|    if (entry)
  ------------------
  |  Branch (252:9): [True: 29.6k, False: 31.0k]
  ------------------
  253|  29.6k|      return entry;
  254|  60.6k|  }
  255|  87.8k|  return nullptr;
  256|   117k|}
_ZN8rawspeed7TiffIFD31recursivelyIncrementSubIFDCountEv:
  258|  39.2k|void TiffIFD::recursivelyIncrementSubIFDCount() {
  259|  39.2k|  TiffIFD* p = this->parent;
  260|  39.2k|  if (!p)
  ------------------
  |  Branch (260:7): [True: 7.15k, False: 32.1k]
  ------------------
  261|  7.15k|    return;
  262|       |
  263|  32.1k|  p->subIFDCount++;
  264|       |
  265|   102k|  for (; p != nullptr; p = p->parent)
  ------------------
  |  Branch (265:10): [True: 70.7k, False: 32.1k]
  ------------------
  266|  70.7k|    p->subIFDCountRecursive++;
  267|  32.1k|}
_ZNK8rawspeed7TiffIFD12checkSubIFDsEi:
  269|   200k|void TiffIFD::checkSubIFDs(int headroom) const {
  270|   200k|  int count = headroom + subIFDCount;
  271|   200k|  if (!headroom)
  ------------------
  |  Branch (271:7): [True: 54.5k, False: 146k]
  ------------------
  272|   200k|    assert(count <= TiffIFD::Limits::SubIFDCount);
  ------------------
  |  Branch (272:5): [True: 54.5k, False: 0]
  ------------------
  273|   146k|  else if (count > TiffIFD::Limits::SubIFDCount)
  ------------------
  |  Branch (273:12): [True: 6.32k, False: 140k]
  ------------------
  274|  6.32k|    ThrowTPE("TIFF IFD has %d SubIFDs", count);
  ------------------
  |  |   39|  6.32k|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  6.32k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  6.32k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  6.32k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  275|       |
  276|   194k|  count = headroom + subIFDCountRecursive;
  277|   194k|  if (!headroom)
  ------------------
  |  Branch (277:7): [True: 54.5k, False: 140k]
  ------------------
  278|   194k|    assert(count <= TiffIFD::Limits::RecursiveSubIFDCount);
  ------------------
  |  Branch (278:5): [True: 54.5k, False: 0]
  ------------------
  279|   140k|  else if (count > TiffIFD::Limits::RecursiveSubIFDCount)
  ------------------
  |  Branch (279:12): [True: 4.71k, False: 135k]
  ------------------
  280|  4.71k|    ThrowTPE("TIFF IFD file has %d SubIFDs (recursively)", count);
  ------------------
  |  |   39|  4.71k|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  4.71k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  4.71k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  4.71k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  281|   194k|}
_ZNK8rawspeed7TiffIFD23recursivelyCheckSubIFDsEi:
  283|  68.3k|void TiffIFD::recursivelyCheckSubIFDs(int headroom) const {
  284|  68.3k|  int depth = 0;
  285|   269k|  for (const TiffIFD* p = this; p != nullptr;) {
  ------------------
  |  Branch (285:33): [True: 201k, False: 68.1k]
  ------------------
  286|   201k|    if (!headroom)
  ------------------
  |  Branch (286:9): [True: 54.5k, False: 146k]
  ------------------
  287|   201k|      assert(depth <= TiffIFD::Limits::Depth);
  ------------------
  |  Branch (287:7): [True: 54.5k, False: 0]
  ------------------
  288|   146k|    else if (depth > TiffIFD::Limits::Depth)
  ------------------
  |  Branch (288:14): [True: 233, False: 146k]
  ------------------
  289|    233|      ThrowTPE("TiffIFD cascading overflow, found %d level IFD", depth);
  ------------------
  |  |   39|    233|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    233|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    233|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    233|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  290|       |
  291|   200k|    p->checkSubIFDs(headroom);
  292|       |
  293|       |    // And step up
  294|   200k|    p = p->parent;
  295|   200k|    depth++;
  296|   200k|  }
  297|  68.3k|}
_ZN8rawspeed7TiffIFD3addENSt3__110unique_ptrIS0_NS1_14default_deleteIS0_EEEE:
  299|  17.8k|void TiffIFD::add(TiffIFDOwner subIFD) {
  300|  17.8k|  assert(subIFD->parent == this);
  ------------------
  |  Branch (300:3): [True: 17.8k, False: 0]
  ------------------
  301|       |
  302|       |  // We are good, and actually can add this sub-IFD, right?
  303|  17.8k|  subIFD->recursivelyCheckSubIFDs(0);
  304|       |
  305|  17.8k|  subIFDs.push_back(std::move(subIFD));
  306|  17.8k|}
_ZN8rawspeed7TiffIFD3addENSt3__110unique_ptrINS_9TiffEntryENS1_14default_deleteIS3_EEEE:
  308|  48.8k|void TiffIFD::add(TiffEntryOwner entry) {
  309|  48.8k|  entry->parent = this;
  310|  48.8k|  entries[entry->tag] = std::move(entry);
  311|  48.8k|}
_ZNK8rawspeed11TiffRootIFD5getIDEv:
  325|  14.5k|TiffID TiffRootIFD::getID() const {
  326|  14.5k|  TiffID id;
  327|  14.5k|  const auto* makeE = getEntryRecursive(TiffTag::MAKE);
  328|  14.5k|  const auto* modelE = getEntryRecursive(TiffTag::MODEL);
  329|       |
  330|  14.5k|  if (!makeE)
  ------------------
  |  Branch (330:7): [True: 1.88k, False: 12.6k]
  ------------------
  331|  14.5k|    ThrowTPE("Failed to find MAKE entry.");
  ------------------
  |  |   39|  1.88k|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  1.88k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  1.88k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  1.88k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  332|  12.6k|  if (!modelE)
  ------------------
  |  Branch (332:7): [True: 308, False: 12.3k]
  ------------------
  333|  12.6k|    ThrowTPE("Failed to find MODEL entry.");
  ------------------
  |  |   39|    308|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|    308|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|    308|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|    308|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  334|       |
  335|  12.3k|  id.make = trimSpaces(makeE->getString());
  336|  12.3k|  id.model = trimSpaces(modelE->getString());
  337|       |
  338|  12.3k|  return id;
  339|  12.6k|}
TiffIFD.cpp:_ZZN8rawspeed7TiffIFD14parseMakerNoteEPNS_11NORangesSetINS_6BufferEEEPKNS_9TiffEntryEENK3$_0clEbjjPKc:
  168|  5.63k|                     const char* context = nullptr) {
  169|  5.63k|    if (rebase)
  ------------------
  |  Branch (169:9): [True: 4.19k, False: 1.43k]
  ------------------
  170|  4.19k|      bs = bs.getSubStream(bs.getPosition(), bs.getRemainSize());
  171|  5.63k|    if (context)
  ------------------
  |  Branch (171:9): [True: 3.39k, False: 2.24k]
  ------------------
  172|  3.39k|      bs.setByteOrder(getTiffByteOrder(bs, byteOrderOffset, context));
  173|  5.63k|    bs.skipBytes(newPosition);
  174|  5.63k|  };

_ZNK8rawspeed7TiffIFD10getNextIFDEv:
  112|  7.18k|  [[nodiscard]] uint32_t getNextIFD() const { return nextIFD; }
_ZNK8rawspeed7TiffIFD17hasEntryRecursiveENS_7TiffTagE:
  122|  1.90k|  [[nodiscard]] bool hasEntryRecursive(TiffTag tag) const {
  123|  1.90k|    return getEntryRecursive(tag) != nullptr;
  124|  1.90k|  }
_ZNK8rawspeed7TiffIFD10getSubIFDsEv:
  126|  7.18k|  [[nodiscard]] const std::vector<TiffIFDOwner>& getSubIFDs() const {
  127|  7.18k|    return subIFDs;
  128|  7.18k|  }
_ZN8rawspeed11TiffRootIFDC2EPNS_7TiffIFDEPNS_11NORangesSetINS_6BufferEEENS_10DataBufferEj:
  146|  28.4k|      : TiffIFD(parent_, ifds, data, offset), rootBuffer(data) {}
_ZN8rawspeed16getTiffByteOrderENS_10ByteStreamEjPKc:
  154|  12.1k|                                   const char* context = "") {
  155|  12.1k|  if (bs.hasPatternAt("II", pos))
  ------------------
  |  Branch (155:7): [True: 6.89k, False: 5.29k]
  ------------------
  156|  6.89k|    return Endianness::little;
  157|  5.29k|  if (bs.hasPatternAt("MM", pos))
  ------------------
  |  Branch (157:7): [True: 2.91k, False: 2.38k]
  ------------------
  158|  2.91k|    return Endianness::big;
  159|       |
  160|  2.38k|  ThrowTPE("Failed to parse TIFF endianness information in %s.", context);
  ------------------
  |  |   39|  2.38k|  ThrowExceptionHelper(rawspeed::TiffParserException, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |   84|  2.38k|  rawspeed::ThrowException<CLASS>("%s, line " STR(__LINE__) ": " fmt,          \
  |  |  |  |   85|  2.38k|                                  __PRETTY_FUNCTION__ __VA_OPT__(, )           \
  |  |  |  |   86|  2.38k|                                      __VA_ARGS__)
  |  |  ------------------
  ------------------
  161|  5.29k|}
_ZN8rawspeed7TiffIFDD2Ev:
  105|  39.2k|  virtual ~TiffIFD() = default;

_ZNKSt3__16__lessIvvEclB8ne180100IPKcS4_EEbRKT_RKT0_:
   40|    594|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __lhs, const _Up& __rhs) const {
   41|    594|    return __lhs < __rhs;
   42|    594|  }

_ZNKSt3__114__copy_trivialclB8ne180100IKccTnNS_9enable_ifIXsr38__can_lower_copy_assignment_to_memmoveIT_T0_EE5valueEiE4typeELi0EEENS_4pairIPS4_PS5_EES9_S9_SA_:
  103|    594|  operator()(_In* __first, _In* __last, _Out* __result) const {
  104|    594|    return std::__copy_trivial_impl(__first, __last, __result);
  105|    594|  }
_ZNSt3__16__copyB8ne180100INS_17_ClassicAlgPolicyEPKcS3_PcEENS_4pairIT0_T2_EES6_T1_S7_:
  110|    594|__copy(_InIter __first, _Sent __last, _OutIter __result) {
  111|    594|  return std::__dispatch_copy_or_move<_AlgPolicy, __copy_loop<_AlgPolicy>, __copy_trivial>(
  112|    594|      std::move(__first), std::move(__last), std::move(__result));
  113|    594|}
_ZNSt3__14copyB8ne180100IPKcPcEET0_T_S5_S4_:
  117|    594|copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
  118|    594|  return std::__copy<_ClassicAlgPolicy>(__first, __last, __result).second;
  119|    594|}

_ZNSt3__119__copy_trivial_implB8ne180100IKccEENS_4pairIPT_PT0_EES4_S4_S6_:
   63|    594|__copy_trivial_impl(_In* __first, _In* __last, _Out* __result) {
   64|    594|  const size_t __n = static_cast<size_t>(__last - __first);
   65|       |
   66|    594|  std::__constexpr_memmove(__result, __first, __element_count(__n));
   67|       |
   68|    594|  return std::make_pair(__last, __result + __n);
   69|    594|}
_ZNSt3__121__unwrap_and_dispatchB8ne180100INS_10__overloadINS_11__copy_loopINS_17_ClassicAlgPolicyEEENS_14__copy_trivialEEEPKcS8_PcTnNS_9enable_ifIXsr12__can_rewrapIT0_T1_T2_EE5valueEiE4typeELi0EEENS_4pairISB_SD_EESB_SC_SD_:
  107|    594|__unwrap_and_dispatch(_InIter __first, _Sent __last, _OutIter __out_first) {
  108|    594|  auto __range  = std::__unwrap_range(__first, std::move(__last));
  109|    594|  auto __result = _Algorithm()(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__out_first));
  110|    594|  return std::make_pair(std::__rewrap_range<_Sent>(std::move(__first), std::move(__result.first)),
  111|    594|                        std::__rewrap_iter(std::move(__out_first), std::move(__result.second)));
  112|    594|}
_ZNSt3__123__dispatch_copy_or_moveB8ne180100INS_17_ClassicAlgPolicyENS_11__copy_loopIS1_EENS_14__copy_trivialEPKcS6_PcEENS_4pairIT2_T4_EES9_T3_SA_:
  131|    594|__dispatch_copy_or_move(_InIter __first, _Sent __last, _OutIter __out_first) {
  132|    594|  using _Algorithm = __overload<_NaiveAlgorithm, _OptimizedAlgorithm>;
  133|    594|  return std::__unwrap_and_dispatch<_Algorithm>(std::move(__first), std::move(__last), std::move(__out_first));
  134|    594|}

_ZNSt3__16copy_nB8ne180100IPKcmPcTnNS_9enable_ifIXsr37__has_random_access_iterator_categoryIT_EE5valueEiE4typeELi0EEET1_S5_T0_S8_:
   51|    594|copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
   52|    594|  typedef typename iterator_traits<_InputIterator>::difference_type difference_type;
   53|    594|  typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
   54|    594|  _IntegralSize __n = __orig_n;
   55|    594|  return std::copy(__first, __first + difference_type(__n), __result);
   56|    594|}

_ZNSt3__118__unwrap_iter_implIPKcLb1EE8__unwrapB8ne180100ES2_:
   55|  1.18k|  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToAddressT __unwrap(_Iter __i) _NOEXCEPT {
   56|  1.18k|    return std::__to_address(__i);
   57|  1.18k|  }
_ZNSt3__113__unwrap_iterB8ne180100IPKcNS_18__unwrap_iter_implIS2_Lb1EEETnNS_9enable_ifIXsr21is_copy_constructibleIT_EE5valueEiE4typeELi0EEEDTclsrT0_8__unwrapclsr3stdE7declvalIS6_EEEES6_:
   64|  1.18k|__unwrap_iter(_Iter __i) _NOEXCEPT {
   65|  1.18k|  return _Impl::__unwrap(__i);
   66|  1.18k|}
_ZNSt3__118__unwrap_iter_implIPcLb1EE8__unwrapB8ne180100ES1_:
   55|    594|  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToAddressT __unwrap(_Iter __i) _NOEXCEPT {
   56|    594|    return std::__to_address(__i);
   57|    594|  }
_ZNSt3__113__unwrap_iterB8ne180100IPcNS_18__unwrap_iter_implIS1_Lb1EEETnNS_9enable_ifIXsr21is_copy_constructibleIT_EE5valueEiE4typeELi0EEEDTclsrT0_8__unwrapclsr3stdE7declvalIS5_EEEES5_:
   64|    594|__unwrap_iter(_Iter __i) _NOEXCEPT {
   65|    594|  return _Impl::__unwrap(__i);
   66|    594|}
_ZNSt3__118__unwrap_iter_implIPKcLb1EE8__rewrapB8ne180100ES2_S2_:
   51|    594|  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
   52|    594|    return __orig_iter + (__unwrapped_iter - std::__to_address(__orig_iter));
   53|    594|  }
_ZNSt3__113__rewrap_iterB8ne180100IPKcS2_NS_18__unwrap_iter_implIS2_Lb1EEEEET_S5_T0_:
   77|    594|_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _OrigIter __rewrap_iter(_OrigIter __orig_iter, _Iter __iter) _NOEXCEPT {
   78|    594|  return _Impl::__rewrap(std::move(__orig_iter), std::move(__iter));
   79|    594|}
_ZNSt3__118__unwrap_iter_implIPcLb1EE8__rewrapB8ne180100ES1_S1_:
   51|    594|  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
   52|    594|    return __orig_iter + (__unwrapped_iter - std::__to_address(__orig_iter));
   53|    594|  }
_ZNSt3__113__rewrap_iterB8ne180100IPcS1_NS_18__unwrap_iter_implIS1_Lb1EEEEET_S4_T0_:
   77|    594|_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _OrigIter __rewrap_iter(_OrigIter __orig_iter, _Iter __iter) _NOEXCEPT {
   78|    594|  return _Impl::__rewrap(std::move(__orig_iter), std::move(__iter));
   79|    594|}

_ZNSt3__119__unwrap_range_implIPKcS2_E8__unwrapB8ne180100ES2_S2_:
   64|    594|  _LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Iter __last) {
   65|    594|    return pair{std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last))};
   66|    594|  }
_ZNSt3__114__unwrap_rangeB8ne180100IPKcS2_EEDaT_T0_:
   75|    594|_LIBCPP_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last) {
   76|    594|  return __unwrap_range_impl<_Iter, _Sent>::__unwrap(std::move(__first), std::move(__last));
   77|    594|}
_ZNSt3__119__unwrap_range_implIPKcS2_E8__rewrapB8ne180100ES2_S2_:
   69|    594|  __rewrap(_Iter __orig_iter, decltype(std::__unwrap_iter(__orig_iter)) __iter) {
   70|    594|    return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
   71|    594|  }
_ZNSt3__114__rewrap_rangeB8ne180100IPKcS2_S2_EET0_S3_T1_:
   80|    594|_LIBCPP_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
   81|    594|  return __unwrap_range_impl<_Iter, _Sent>::__rewrap(std::move(__orig_iter), std::move(__iter));
   82|    594|}

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

_ZNSt3__122__libcpp_aligned_allocB8ne180100Emm:
   30|  55.6k|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|  55.6k|  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|  55.6k|  return ::aligned_alloc(__alignment, __size > __rounded_size ? __size : __rounded_size);
  ------------------
  |  Branch (43:39): [True: 0, False: 55.6k]
  ------------------
   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|  55.6k|}
_ZNSt3__121__libcpp_aligned_freeB8ne180100EPv:
   52|  55.6k|inline _LIBCPP_HIDE_FROM_ABI void __libcpp_aligned_free(void* __ptr) {
   53|       |#  if defined(_LIBCPP_MSVCRT_LIKE)
   54|       |  ::_aligned_free(__ptr);
   55|       |#  else
   56|  55.6k|  ::free(__ptr);
   57|  55.6k|#  endif
   58|  55.6k|}

_ZNSt3__122__compressed_pair_elemINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repELi0ELb0EE5__getB8ne180100Ev:
   63|  3.56k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference __get() _NOEXCEPT { return __value_; }
_ZNSt3__117__compressed_pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repES5_E5firstB8ne180100Ev:
  129|  3.56k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename _Base1::reference first() _NOEXCEPT {
  130|  3.56k|    return static_cast<_Base1&>(*this).__get();
  131|  3.56k|  }
_ZNKSt3__122__compressed_pair_elemINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repELi0ELb0EE5__getB8ne180100Ev:
   64|  5.94k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }
_ZNKSt3__117__compressed_pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5__repES5_E5firstB8ne180100Ev:
  133|  5.94k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR typename _Base1::const_reference first() const _NOEXCEPT {
  134|  5.94k|    return static_cast<_Base1 const&>(*this).__get();
  135|  5.94k|  }

_ZNSt3__112__to_addressB8ne180100IKcEEPT_S3_:
  180|  1.78k|_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __to_address(_Tp* __p) _NOEXCEPT {
  181|  1.78k|  static_assert(!is_function<_Tp>::value, "_Tp is a function type");
  182|  1.78k|  return __p;
  183|  1.78k|}
_ZNSt3__112__to_addressB8ne180100IcEEPT_S2_:
  180|  2.37k|_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __to_address(_Tp* __p) _NOEXCEPT {
  181|  2.37k|  static_assert(!is_function<_Tp>::value, "_Tp is a function type");
  182|  2.37k|  return __p;
  183|  2.37k|}
_ZNSt3__114pointer_traitsIPcE10pointer_toB8ne180100ERc:
  161|  1.18k|  pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT {
  162|  1.18k|    return std::addressof(__r);
  163|  1.18k|  }

_ZNSt3__111char_traitsIcE6assignB8ne180100ERcRKc:
  189|  1.18k|  assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {
  190|  1.18k|    __c1 = __c2;
  191|  1.18k|  }
_ZNSt3__111char_traitsIcE4moveB8ne180100EPcPKcm:
  238|  1.18k|  move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
  239|  1.18k|    return std::__constexpr_memmove(__s1, __s2, __element_count(__n));
  240|  1.18k|  }
_ZNSt3__111char_traitsIcE4copyB8ne180100EPcPKcm:
  243|    594|  copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
  244|    594|    _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(!std::__is_pointer_in_range(__s1, __s1 + __n, __s2),
  ------------------
  |  |  410|    594|#    define _LIBCPP_ASSERT_NON_OVERLAPPING_RANGES(expression, message)    _LIBCPP_ASSUME(expression)
  |  |  ------------------
  |  |  |  |   34|    594|#  define _LIBCPP_ASSUME(expression) ((void)0)
  |  |  ------------------
  ------------------
  245|    594|                                          "char_traits::copy: source and destination ranges overlap");
  246|    594|    std::copy_n(__s2, __n, __s1);
  247|    594|    return __s1;
  248|    594|  }

_ZNSt3__119__constexpr_memmoveB8ne180100IcKcTnNS_9enable_ifIXsr23__is_always_bitcastableIT0_T_EE5valueEiE4typeELi0EEEPS4_S7_PS3_NS_15__element_countE:
  195|  1.78k|__constexpr_memmove(_Tp* __dest, _Up* __src, __element_count __n) {
  196|  1.78k|  size_t __count = static_cast<size_t>(__n);
  197|  1.78k|  if (__libcpp_is_constant_evaluated()) {
  ------------------
  |  Branch (197:7): [Folded, False: 1.78k]
  ------------------
  198|      0|#ifdef _LIBCPP_COMPILER_CLANG_BASED
  199|      0|    if (is_same<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >::value) {
  ------------------
  |  Branch (199:9): [True: 0, Folded]
  ------------------
  200|      0|      ::__builtin_memmove(__dest, __src, __count * sizeof(_Tp));
  201|      0|      return __dest;
  202|      0|    }
  203|      0|#endif
  204|      0|    if (std::__is_pointer_in_range(__src, __src + __count, __dest)) {
  ------------------
  |  Branch (204:9): [True: 0, False: 0]
  ------------------
  205|      0|      for (; __count > 0; --__count)
  ------------------
  |  Branch (205:14): [True: 0, False: 0]
  ------------------
  206|      0|        std::__assign_trivially_copyable(__dest[__count - 1], __src[__count - 1]);
  207|      0|    } else {
  208|      0|      for (size_t __i = 0; __i != __count; ++__i)
  ------------------
  |  Branch (208:28): [True: 0, False: 0]
  ------------------
  209|      0|        std::__assign_trivially_copyable(__dest[__i], __src[__i]);
  210|      0|    }
  211|  1.78k|  } else if (__count > 0) {
  ------------------
  |  Branch (211:14): [True: 1.78k, False: 0]
  ------------------
  212|  1.78k|    ::__builtin_memmove(__dest, __src, (__count - 1) * sizeof(_Tp) + __libcpp_datasizeof<_Tp>::value);
  213|  1.78k|  }
  214|  1.78k|  return __dest;
  215|  1.78k|}

_ZNSt3__121__libcpp_execute_onceB8ne180100EPiPFvvE:
  302|   166k|int __libcpp_execute_once(__libcpp_exec_once_flag* __flag, void (*__init_routine)()) {
  303|   166k|  return pthread_once(__flag, __init_routine);
  304|   166k|}
_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|   166k|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); }

_ZNSt3__121__is_pointer_in_rangeB8ne180100IccTnNS_9enable_ifIXsr25__is_less_than_comparableIPKT_PKT0_EE5valueEiE4typeELi0EEEbS4_S4_S7_:
   36|    594|    const _Tp* __begin, const _Tp* __end, const _Up* __ptr) {
   37|    594|  if (__libcpp_is_constant_evaluated()) {
  ------------------
  |  Branch (37:7): [Folded, False: 594]
  ------------------
   38|      0|    _LIBCPP_ASSERT_VALID_INPUT_RANGE(__builtin_constant_p(__begin <= __end), "__begin and __end do not form a range");
  ------------------
  |  |  407|      0|#    define _LIBCPP_ASSERT_VALID_INPUT_RANGE(expression, message)         _LIBCPP_ASSUME(expression)
  |  |  ------------------
  |  |  |  |   34|      0|#  define _LIBCPP_ASSUME(expression) ((void)0)
  |  |  ------------------
  ------------------
   39|       |
   40|       |    // If this is not a constant during constant evaluation we know that __ptr is not part of the allocation where
   41|       |    // [__begin, __end) is.
   42|      0|    if (!__builtin_constant_p(__begin <= __ptr && __ptr < __end))
  ------------------
  |  Branch (42:9): [True: 0, False: 0]
  |  Branch (42:31): [True: 0, False: 0]
  |  Branch (42:51): [True: 0, False: 0]
  ------------------
   43|      0|      return false;
   44|      0|  }
   45|       |
   46|       |  // Checking this for unrelated pointers is technically UB, but no compiler optimizes based on it (currently).
   47|    594|  return !__less<>()(__ptr, __begin) && __less<>()(__ptr, __end);
  ------------------
  |  Branch (47:10): [True: 0, False: 594]
  |  Branch (47:41): [True: 0, False: 0]
  ------------------
   48|    594|}

_ZNSt3__19make_pairB8ne180100IRPKcPcEENS_4pairINS_18__unwrap_ref_decayIT_E4typeENS6_IT0_E4typeEEEOS7_OSA_:
  599|    594|    make_pair(_T1&& __t1, _T2&& __t2) {
  600|    594|  return pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>(
  601|    594|      std::forward<_T1>(__t1), std::forward<_T2>(__t2));
  602|    594|}
_ZNSt3__19make_pairB8ne180100IPKcPcEENS_4pairINS_18__unwrap_ref_decayIT_E4typeENS5_IT0_E4typeEEEOS6_OS9_:
  599|    594|    make_pair(_T1&& __t1, _T2&& __t2) {
  600|    594|  return pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>(
  601|    594|      std::forward<_T1>(__t1), std::forward<_T2>(__t2));
  602|    594|}
_ZNSt3__14pairIPKcS2_EC2B8ne180100IS2_S2_TnNS_9enable_ifIXclsr10_CheckArgsE17__enable_implicitIT_T0_EEEiE4typeELi0EEEOS6_OS7_:
  207|    594|      : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {
  208|    594|  }
_ZNSt3__14pairIPKcPcEC2B8ne180100IRS2_S3_TnNS_9enable_ifIXclsr10_CheckArgsE17__enable_implicitIT_T0_EEEiE4typeELi0EEEOS8_OS9_:
  207|    594|      : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {
  208|    594|  }
_ZNSt3__14pairIPKcPcEC2B8ne180100IS2_S3_TnNS_9enable_ifIXclsr10_CheckArgsE17__enable_implicitIT_T0_EEEiE4typeELi0EEEOS7_OS8_:
  207|    594|      : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {
  208|    594|  }

_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16__set_short_sizeB8ne180100Em:
 1830|  1.18k|  __set_short_size(size_type __s) _NOEXCEPT {
 1831|  1.18k|    _LIBCPP_ASSERT_INTERNAL(__s < __min_cap, "__s should never be greater than or equal to the short string capacity");
  ------------------
  |  |  417|  1.18k|#    define _LIBCPP_ASSERT_INTERNAL(expression, message)                  _LIBCPP_ASSUME(expression)
  |  |  ------------------
  |  |  |  |   34|  1.18k|#  define _LIBCPP_ASSUME(expression) ((void)0)
  |  |  ------------------
  ------------------
 1832|  1.18k|    __r_.first().__s.__size_    = __s;
 1833|  1.18k|    __r_.first().__s.__is_long_ = false;
 1834|  1.18k|  }
_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__get_short_pointerB8ne180100Ev:
 1873|  1.18k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pointer __get_short_pointer() _NOEXCEPT {
 1874|  1.18k|    return pointer_traits<pointer>::pointer_to(__r_.first().__s.__data_[0]);
 1875|  1.18k|  }
_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__is_longB8ne180100Ev:
 1769|  4.75k|  __is_long() const _NOEXCEPT {
 1770|  4.75k|    if (__libcpp_is_constant_evaluated() && __builtin_constant_p(__r_.first().__l.__is_long_)) {
  ------------------
  |  Branch (1770:9): [Folded, False: 4.75k]
  |  Branch (1770:45): [Folded, False: 0]
  ------------------
 1771|      0|      return __r_.first().__l.__is_long_;
 1772|      0|    }
 1773|  4.75k|    return __r_.first().__s.__is_long_;
 1774|  4.75k|  }
_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE8capacityB8ne180100Ev:
 1191|  1.18k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type capacity() const _NOEXCEPT {
 1192|  1.18k|    return (__is_long() ? __get_long_cap() : static_cast<size_type>(__min_cap)) - 1;
  ------------------
  |  Branch (1192:13): [True: 0, False: 1.18k]
  ------------------
 1193|  1.18k|  }
_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE16__get_short_sizeB8ne180100Ev:
 1837|  1.18k|  __get_short_size() const _NOEXCEPT {
 1838|  1.18k|    _LIBCPP_ASSERT_INTERNAL(!__r_.first().__s.__is_long_, "String has to be short when trying to get the short size");
  ------------------
  |  |  417|  1.18k|#    define _LIBCPP_ASSERT_INTERNAL(expression, message)                  _LIBCPP_ASSUME(expression)
  |  |  ------------------
  |  |  |  |   34|  1.18k|#  define _LIBCPP_ASSUME(expression) ((void)0)
  |  |  ------------------
  ------------------
 1839|  1.18k|    return __r_.first().__s.__size_;
 1840|  1.18k|  }
_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4sizeB8ne180100Ev:
 1176|  1.18k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_type size() const _NOEXCEPT {
 1177|  1.18k|    return __is_long() ? __get_long_size() : __get_short_size();
  ------------------
  |  Branch (1177:12): [True: 0, False: 1.18k]
  ------------------
 1178|  1.18k|  }
_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE19__annotate_increaseB8ne180100Em:
 1919|  1.18k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_increase(size_type __n) const _NOEXCEPT {
 1920|  1.18k|    (void) __n;
 1921|       |#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
 1922|       |    if (!__libcpp_is_constant_evaluated() && (__asan_short_string_is_annotated() || __is_long()))
 1923|       |      __annotate_contiguous_container(data() + size() + 1, data() + size() + 1 + __n);
 1924|       |#endif
 1925|  1.18k|  }
_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE13__get_pointerB8ne180100Ev:
 1879|  1.18k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pointer __get_pointer() _NOEXCEPT {
 1880|  1.18k|    return __is_long() ? __get_long_pointer() : __get_short_pointer();
  ------------------
  |  Branch (1880:12): [True: 0, False: 1.18k]
  ------------------
 1881|  1.18k|  }
_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE10__set_sizeB8ne180100Em:
 1848|  1.18k|  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_size(size_type __s) _NOEXCEPT {
 1849|  1.18k|    if (__is_long())
  ------------------
  |  Branch (1849:9): [True: 0, False: 1.18k]
  ------------------
 1850|      0|      __set_long_size(__s);
 1851|  1.18k|    else
 1852|  1.18k|      __set_short_size(__s);
 1853|  1.18k|  }
_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm:
 2711|    594|basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n) {
 2712|    594|  _LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::append received nullptr");
  ------------------
  |  |  409|    594|#    define _LIBCPP_ASSERT_NON_NULL(expression, message)                  _LIBCPP_ASSUME(expression)
  |  |  ------------------
  |  |  |  |   34|    594|#  define _LIBCPP_ASSUME(expression) ((void)0)
  |  |  ------------------
  ------------------
 2713|    594|  size_type __cap = capacity();
 2714|    594|  size_type __sz  = size();
 2715|    594|  if (__cap - __sz >= __n) {
  ------------------
  |  Branch (2715:7): [True: 594, False: 0]
  ------------------
 2716|    594|    if (__n) {
  ------------------
  |  Branch (2716:9): [True: 594, False: 0]
  ------------------
 2717|    594|      __annotate_increase(__n);
 2718|    594|      value_type* __p = std::__to_address(__get_pointer());
 2719|    594|      traits_type::copy(__p + __sz, __s, __n);
 2720|    594|      __sz += __n;
 2721|    594|      __set_size(__sz);
 2722|    594|      traits_type::assign(__p[__sz], value_type());
 2723|    594|    }
 2724|    594|  } else
 2725|      0|    __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __sz, 0, __n, __s);
 2726|    594|  return *this;
 2727|    594|}
_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertEmPKcm:
 2852|    594|basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n) {
 2853|    594|  _LIBCPP_ASSERT_NON_NULL(__n == 0 || __s != nullptr, "string::insert received nullptr");
  ------------------
  |  |  409|    594|#    define _LIBCPP_ASSERT_NON_NULL(expression, message)                  _LIBCPP_ASSUME(expression)
  |  |  ------------------
  |  |  |  |   34|    594|#  define _LIBCPP_ASSUME(expression) ((void)0)
  |  |  ------------------
  ------------------
 2854|    594|  size_type __sz = size();
 2855|    594|  if (__pos > __sz)
  ------------------
  |  Branch (2855:7): [True: 0, False: 594]
  ------------------
 2856|      0|    __throw_out_of_range();
 2857|    594|  size_type __cap = capacity();
 2858|    594|  if (__cap - __sz >= __n) {
  ------------------
  |  Branch (2858:7): [True: 594, False: 0]
  ------------------
 2859|    594|    if (__n) {
  ------------------
  |  Branch (2859:9): [True: 594, False: 0]
  ------------------
 2860|    594|      __annotate_increase(__n);
 2861|    594|      value_type* __p    = std::__to_address(__get_pointer());
 2862|    594|      size_type __n_move = __sz - __pos;
 2863|    594|      if (__n_move != 0) {
  ------------------
  |  Branch (2863:11): [True: 594, False: 0]
  ------------------
 2864|    594|        if (std::__is_pointer_in_range(__p + __pos, __p + __sz, __s))
  ------------------
  |  Branch (2864:13): [True: 0, False: 594]
  ------------------
 2865|      0|          __s += __n;
 2866|    594|        traits_type::move(__p + __pos + __n, __p + __pos, __n_move);
 2867|    594|      }
 2868|    594|      traits_type::move(__p + __pos, __s, __n);
 2869|    594|      __sz += __n;
 2870|    594|      __set_size(__sz);
 2871|    594|      traits_type::assign(__p[__sz], value_type());
 2872|    594|    }
 2873|    594|  } else
 2874|      0|    __grow_by_and_replace(__cap, __sz + __n - __cap, __sz, __pos, 0, __n, __s);
 2875|    594|  return *this;
 2876|    594|}

_ZNSt27__type_info_implementations13__unique_impl4__eqB8ne180100EPKcS2_:
  203|   324k|    _LIBCPP_HIDE_FROM_ABI _LIBCPP_ALWAYS_INLINE static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
  204|   324k|      return __lhs == __rhs;
  205|   324k|    }
_ZNKSt9type_infoeqB8ne180100ERKS_:
  302|   324k|  _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|   324k|    if (__libcpp_is_constant_evaluated()) {
  ------------------
  |  Branch (305:9): [Folded, False: 324k]
  ------------------
  306|      0|      return this == &__arg;
  307|      0|    }
  308|   324k|    return __impl::__eq(__type_name, __arg.__type_name);
  309|   324k|  }

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

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

_ZNSt3__119__shared_weak_count14__release_weakEv:
   57|    770|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|    770|  if (__libcpp_atomic_load(&__shared_weak_owners_, _AO_Acquire) == 0) {
  ------------------
  |  Branch (79:7): [True: 770, 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|    770|    __on_zero_shared_weak();
   84|    770|  } else if (__libcpp_atomic_refcount_decrement(__shared_weak_owners_) == -1)
  ------------------
  |  Branch (84:14): [True: 0, False: 0]
  ------------------
   85|      0|    __on_zero_shared_weak();
   86|    770|}

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

_ZN10__cxxabiv119__setExceptionClassEP17_Unwind_Exceptionm:
   81|  55.6k|void __setExceptionClass(_Unwind_Exception* unwind_exception, uint64_t newValue) {
   82|  55.6k|    ::memcpy(&unwind_exception->exception_class, &newValue, sizeof(newValue));
   83|  55.6k|}
_ZN10__cxxabiv119__getExceptionClassEPK17_Unwind_Exception:
   95|   236k|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|   236k|    uint64_t exClass;
  101|   236k|    ::memcpy(&exClass, &unwind_exception->exception_class, sizeof(exClass));
  102|   236k|    return exClass;
  103|   236k|}
_ZN10__cxxabiv121__isOurExceptionClassEPK17_Unwind_Exception:
  105|   111k|bool __isOurExceptionClass(const _Unwind_Exception* unwind_exception) {
  106|   111k|    return (__getExceptionClass(unwind_exception) & get_vendor_and_language) ==
  107|   111k|           (kOurExceptionClass                    & get_vendor_and_language);
  108|   111k|}
__cxa_allocate_exception:
  183|  55.6k|void *__cxa_allocate_exception(size_t thrown_size) throw() {
  184|  55.6k|    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|  55.6k|    size_t header_offset = get_cxa_exception_offset();
  189|  55.6k|    char *raw_buffer =
  190|  55.6k|        (char *)__aligned_malloc_with_fallback(header_offset + actual_size);
  191|  55.6k|    if (NULL == raw_buffer)
  ------------------
  |  Branch (191:9): [True: 0, False: 55.6k]
  ------------------
  192|      0|        std::terminate();
  193|  55.6k|    __cxa_exception *exception_header =
  194|  55.6k|        static_cast<__cxa_exception *>((void *)(raw_buffer + header_offset));
  195|  55.6k|    ::memset(exception_header, 0, actual_size);
  196|  55.6k|    return thrown_object_from_cxa_exception(exception_header);
  197|  55.6k|}
__cxa_free_exception:
  201|  55.6k|void __cxa_free_exception(void *thrown_object) throw() {
  202|       |    // Compute the size of the padding before the header.
  203|  55.6k|    size_t header_offset = get_cxa_exception_offset();
  204|  55.6k|    char *raw_buffer =
  205|  55.6k|        ((char *)cxa_exception_from_thrown_object(thrown_object)) - header_offset;
  206|  55.6k|    __aligned_free_with_fallback((void *)raw_buffer);
  207|  55.6k|}
__cxa_init_primary_exception:
  210|  55.6k|                                              void(_LIBCXXABI_DTOR_FUNC* dest)(void*)) throw() {
  211|  55.6k|  __cxa_exception* exception_header = cxa_exception_from_thrown_object(object);
  212|  55.6k|  exception_header->referenceCount = 0;
  213|  55.6k|  exception_header->unexpectedHandler = std::get_unexpected();
  214|  55.6k|  exception_header->terminateHandler = std::get_terminate();
  215|  55.6k|  exception_header->exceptionType = tinfo;
  216|  55.6k|  exception_header->exceptionDestructor = dest;
  217|  55.6k|  setOurExceptionClass(&exception_header->unwindHeader);
  218|  55.6k|  exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
  219|       |
  220|  55.6k|  return exception_header;
  221|  55.6k|}
__cxa_throw:
  274|  55.6k|__cxa_throw(void *thrown_object, std::type_info *tinfo, void (_LIBCXXABI_DTOR_FUNC *dest)(void *)) {
  275|  55.6k|#endif
  276|  55.6k|  __cxa_eh_globals* globals = __cxa_get_globals();
  277|  55.6k|  globals->uncaughtExceptions += 1; // Not atomically, since globals are thread-local
  278|       |
  279|  55.6k|  __cxa_exception* exception_header = __cxa_init_primary_exception(thrown_object, tinfo, dest);
  280|  55.6k|  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|  55.6k|    _Unwind_RaiseException(&exception_header->unwindHeader);
  291|  55.6k|#endif
  292|       |    //  This only happens when there is no handler, or some unexpected unwinding
  293|       |    //     error happens.
  294|  55.6k|    failed_throw(exception_header);
  295|  55.6k|}
__cxa_begin_catch:
  446|  55.6k|{
  447|  55.6k|    _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(unwind_arg);
  448|  55.6k|    bool native_exception = __isOurExceptionClass(unwind_exception);
  449|  55.6k|    __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|  55.6k|    __cxa_exception* exception_header =
  454|  55.6k|            cxa_exception_from_exception_unwind_exception
  455|  55.6k|            (
  456|  55.6k|                static_cast<_Unwind_Exception*>(unwind_exception)
  457|  55.6k|            );
  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|  55.6k|    if (native_exception)
  ------------------
  |  Branch (466:9): [True: 55.6k, False: 0]
  ------------------
  467|  55.6k|    {
  468|       |        // Increment the handler count, removing the flag about being rethrown
  469|  55.6k|        exception_header->handlerCount = exception_header->handlerCount < 0 ?
  ------------------
  |  Branch (469:42): [True: 0, False: 55.6k]
  ------------------
  470|  55.6k|            -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|  55.6k|        if (exception_header != globals->caughtExceptions)
  ------------------
  |  Branch (473:13): [True: 55.6k, False: 0]
  ------------------
  474|  55.6k|        {
  475|  55.6k|            exception_header->nextException = globals->caughtExceptions;
  476|  55.6k|            globals->caughtExceptions = exception_header;
  477|  55.6k|        }
  478|  55.6k|        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|  55.6k|        return exception_header->adjustedPtr;
  483|  55.6k|#endif
  484|  55.6k|    }
  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|  55.6k|}
__cxa_end_catch:
  513|  55.6k|void __cxa_end_catch() {
  514|  55.6k|  static_assert(sizeof(__cxa_exception) == sizeof(__cxa_dependent_exception),
  515|  55.6k|                "sizeof(__cxa_exception) must be equal to "
  516|  55.6k|                "sizeof(__cxa_dependent_exception)");
  517|  55.6k|  static_assert(__builtin_offsetof(__cxa_exception, referenceCount) ==
  518|  55.6k|                    __builtin_offsetof(__cxa_dependent_exception,
  519|  55.6k|                                       primaryException),
  520|  55.6k|                "the layout of __cxa_exception must match the layout of "
  521|  55.6k|                "__cxa_dependent_exception");
  522|  55.6k|  static_assert(__builtin_offsetof(__cxa_exception, handlerCount) ==
  523|  55.6k|                    __builtin_offsetof(__cxa_dependent_exception, handlerCount),
  524|  55.6k|                "the layout of __cxa_exception must match the layout of "
  525|  55.6k|                "__cxa_dependent_exception");
  526|  55.6k|    __cxa_eh_globals* globals = __cxa_get_globals_fast(); // __cxa_get_globals called in __cxa_begin_catch
  527|  55.6k|    __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|  55.6k|    if (NULL != exception_header)
  ------------------
  |  Branch (531:9): [True: 55.6k, False: 0]
  ------------------
  532|  55.6k|    {
  533|  55.6k|        bool native_exception = __isOurExceptionClass(&exception_header->unwindHeader);
  534|  55.6k|        if (native_exception)
  ------------------
  |  Branch (534:13): [True: 55.6k, False: 0]
  ------------------
  535|  55.6k|        {
  536|       |            // This is a native exception
  537|  55.6k|            if (exception_header->handlerCount < 0)
  ------------------
  |  Branch (537:17): [True: 0, False: 55.6k]
  ------------------
  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|  55.6k|            else
  551|  55.6k|            {
  552|       |                // The native exception has not been rethrown
  553|  55.6k|                if (0 == decrementHandlerCount(exception_header))
  ------------------
  |  Branch (553:21): [True: 55.6k, False: 0]
  ------------------
  554|  55.6k|                {
  555|       |                    //  Remove from the chain of uncaught exceptions
  556|  55.6k|                    globals->caughtExceptions = exception_header->nextException;
  557|       |                    // Destroy this exception, being careful to distinguish
  558|       |                    //    between dependent and primary exceptions
  559|  55.6k|                    if (isDependentException(&exception_header->unwindHeader))
  ------------------
  |  Branch (559:25): [True: 0, False: 55.6k]
  ------------------
  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|  55.6k|                    __cxa_decrement_exception_refcount(thrown_object_from_cxa_exception(exception_header));
  571|  55.6k|                }
  572|  55.6k|            }
  573|  55.6k|        }
  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|  55.6k|    }
  585|  55.6k|}
__cxa_decrement_exception_refcount:
  678|  55.6k|void __cxa_decrement_exception_refcount(void *thrown_object) throw() {
  679|  55.6k|    if (thrown_object != NULL )
  ------------------
  |  Branch (679:9): [True: 55.6k, False: 0]
  ------------------
  680|  55.6k|    {
  681|  55.6k|        __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
  682|  55.6k|        if (std::__libcpp_atomic_add(&exception_header->referenceCount, size_t(-1)) == 0)
  ------------------
  |  Branch (682:13): [True: 55.6k, False: 0]
  ------------------
  683|  55.6k|        {
  684|  55.6k|            if (NULL != exception_header->exceptionDestructor)
  ------------------
  |  Branch (684:17): [True: 55.6k, False: 0]
  ------------------
  685|  55.6k|                exception_header->exceptionDestructor(thrown_object);
  686|  55.6k|            __cxa_free_exception(thrown_object);
  687|  55.6k|        }
  688|  55.6k|    }
  689|  55.6k|}
cxa_exception.cpp:_ZN10__cxxabiv1L45cxa_exception_size_from_exception_thrown_sizeEm:
   76|  55.6k|size_t cxa_exception_size_from_exception_thrown_size(size_t size) {
   77|  55.6k|    return aligned_allocation_size(size + sizeof (__cxa_exception),
   78|  55.6k|                                   alignof(__cxa_exception));
   79|  55.6k|}
cxa_exception.cpp:_ZN10__cxxabiv1L23aligned_allocation_sizeEmm:
   71|  55.6k|size_t aligned_allocation_size(size_t s, size_t a) {
   72|  55.6k|    return (s + a - 1) & ~(a - 1);
   73|  55.6k|}
cxa_exception.cpp:_ZN10__cxxabiv1L24get_cxa_exception_offsetEv:
  161|   111k|static size_t get_cxa_exception_offset() {
  162|   111k|  struct S {
  163|   111k|  } __attribute__((aligned));
  164|       |
  165|       |  // Compute the maximum alignment for the target machine.
  166|   111k|  constexpr size_t alignment = alignof(S);
  167|   111k|  constexpr size_t excp_size = sizeof(__cxa_exception);
  168|   111k|  constexpr size_t aligned_size =
  169|   111k|      (excp_size + alignment - 1) / alignment * alignment;
  170|   111k|  constexpr size_t offset = aligned_size - excp_size;
  171|   111k|  static_assert((offset == 0 || alignof(_Unwind_Exception) < alignment),
  172|   111k|                "offset is non-zero only if _Unwind_Exception isn't aligned");
  173|   111k|  return offset;
  174|   111k|}
cxa_exception.cpp:_ZN10__cxxabiv1L32thrown_object_from_cxa_exceptionEPNS_15__cxa_exceptionE:
   54|   111k|{
   55|   111k|    return static_cast<void*>(exception_header + 1);
   56|   111k|}
cxa_exception.cpp:_ZN10__cxxabiv1L32cxa_exception_from_thrown_objectEPv:
   44|   222k|{
   45|   222k|    return static_cast<__cxa_exception*>(thrown_object) - 1;
   46|   222k|}
cxa_exception.cpp:_ZN10__cxxabiv1L20setOurExceptionClassEP17_Unwind_Exception:
   86|  55.6k|static void setOurExceptionClass(_Unwind_Exception* unwind_exception) {
   87|  55.6k|    __setExceptionClass(unwind_exception, kOurExceptionClass);
   88|  55.6k|}
cxa_exception.cpp:_ZN10__cxxabiv1L45cxa_exception_from_exception_unwind_exceptionEP17_Unwind_Exception:
   65|  55.6k|{
   66|  55.6k|    return cxa_exception_from_thrown_object(unwind_exception + 1 );
   67|  55.6k|}
cxa_exception.cpp:_ZN10__cxxabiv1L21decrementHandlerCountEPNS_15__cxa_exceptionE:
  120|  55.6k|static inline  int decrementHandlerCount(__cxa_exception *exception) {
  121|  55.6k|    return --exception->handlerCount;
  122|  55.6k|}
cxa_exception.cpp:_ZN10__cxxabiv1L20isDependentExceptionEP17_Unwind_Exception:
  110|  55.6k|static bool isDependentException(_Unwind_Exception* unwind_exception) {
  111|  55.6k|    return (__getExceptionClass(unwind_exception) & 0xFF) == 0x01;
  112|  55.6k|}

__cxa_get_globals:
   74|   111k|    __cxa_eh_globals *__cxa_get_globals() {
   75|       |        // Try to get the globals for this thread
   76|   111k|        __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|   111k|        if (NULL == retVal) {
  ------------------
  |  Branch (79:13): [True: 1, False: 111k]
  ------------------
   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|   111k|        return retVal;
   88|   111k|    }
__cxa_get_globals_fast:
   94|   166k|    __cxa_eh_globals *__cxa_get_globals_fast() {
   95|       |        // First time through, create the key.
   96|   166k|        if (0 != std::__libcpp_execute_once(&flag_, construct_))
  ------------------
  |  Branch (96:13): [True: 0, False: 166k]
  ------------------
   97|      0|            abort_message("execute once failure in __cxa_get_globals_fast()");
   98|   166k|        return static_cast<__cxa_eh_globals*>(std::__libcpp_tls_get(key_));
   99|   166k|    }
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|  55.6k|{
   28|  55.6k|    return __libcpp_atomic_load(&__cxa_unexpected_handler, _AO_Acquire);
   29|  55.6k|}
_ZSt13get_terminatev:
   48|  55.6k|{
   49|  55.6k|    return __libcpp_atomic_load(&__cxa_terminate_handler, _AO_Acquire);
   50|  55.6k|}

__gxx_personality_v0:
  924|   411k|{
  925|   411k|    if (version != 1 || unwind_exception == 0 || context == 0)
  ------------------
  |  Branch (925:9): [True: 0, False: 411k]
  |  Branch (925:25): [True: 0, False: 411k]
  |  Branch (925:50): [True: 0, False: 411k]
  ------------------
  926|      0|        return _URC_FATAL_PHASE1_ERROR;
  927|       |
  928|   411k|    bool native_exception = (exceptionClass     & get_vendor_and_language) ==
  929|   411k|                            (kOurExceptionClass & get_vendor_and_language);
  930|   411k|    scan_results results;
  931|       |    // Process a catch handler for a native exception first.
  932|   411k|    if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME) &&
  ------------------
  |  Branch (932:9): [True: 55.6k, False: 356k]
  ------------------
  933|  55.6k|        native_exception) {
  ------------------
  |  Branch (933:9): [True: 55.6k, False: 0]
  ------------------
  934|       |        // Reload the results from the phase 1 cache.
  935|  55.6k|        __cxa_exception* exception_header =
  936|  55.6k|            (__cxa_exception*)(unwind_exception + 1) - 1;
  937|  55.6k|        results.ttypeIndex = exception_header->handlerSwitchValue;
  938|  55.6k|        results.actionRecord = exception_header->actionRecord;
  939|  55.6k|        results.languageSpecificData = exception_header->languageSpecificData;
  940|  55.6k|        results.landingPad =
  941|  55.6k|            reinterpret_cast<uintptr_t>(exception_header->catchTemp);
  942|  55.6k|        results.adjustedPtr = exception_header->adjustedPtr;
  943|       |
  944|       |        // Jump to the handler.
  945|  55.6k|        set_registers(unwind_exception, context, results);
  946|       |        // Cache base for calculating the address of ttype in
  947|       |        // __cxa_call_unexpected.
  948|  55.6k|        if (results.ttypeIndex < 0) {
  ------------------
  |  Branch (948:13): [True: 0, False: 55.6k]
  ------------------
  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|  55.6k|        return _URC_INSTALL_CONTEXT;
  956|  55.6k|    }
  957|       |
  958|       |    // In other cases we need to scan LSDA.
  959|   356k|    scan_eh_tab(results, actions, native_exception, unwind_exception, context);
  960|   356k|    if (results.reason == _URC_CONTINUE_UNWIND ||
  ------------------
  |  Branch (960:9): [True: 245k, False: 110k]
  ------------------
  961|   110k|        results.reason == _URC_FATAL_PHASE1_ERROR)
  ------------------
  |  Branch (961:9): [True: 0, False: 110k]
  ------------------
  962|   245k|        return results.reason;
  963|       |
  964|   110k|    if (actions & _UA_SEARCH_PHASE)
  ------------------
  |  Branch (964:9): [True: 55.6k, False: 54.9k]
  ------------------
  965|  55.6k|    {
  966|       |        // Phase 1 search:  All we're looking for in phase 1 is a handler that
  967|       |        //   halts unwinding
  968|  55.6k|        assert(results.reason == _URC_HANDLER_FOUND);
  ------------------
  |  Branch (968:9): [True: 55.6k, False: 0]
  ------------------
  969|  55.6k|        if (native_exception) {
  ------------------
  |  Branch (969:13): [True: 55.6k, False: 0]
  ------------------
  970|       |            // For a native exception, cache the LSDA result.
  971|  55.6k|            __cxa_exception* exc = (__cxa_exception*)(unwind_exception + 1) - 1;
  972|  55.6k|            exc->handlerSwitchValue = static_cast<int>(results.ttypeIndex);
  973|  55.6k|            exc->actionRecord = results.actionRecord;
  974|  55.6k|            exc->languageSpecificData = results.languageSpecificData;
  975|  55.6k|            exc->catchTemp = reinterpret_cast<void*>(results.landingPad);
  976|  55.6k|            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|  55.6k|        }
  983|  55.6k|        return _URC_HANDLER_FOUND;
  984|  55.6k|    }
  985|       |
  986|   110k|    assert(actions & _UA_CLEANUP_PHASE);
  ------------------
  |  Branch (986:5): [True: 54.9k, False: 0]
  ------------------
  987|  54.9k|    assert(results.reason == _URC_HANDLER_FOUND);
  ------------------
  |  Branch (987:5): [True: 54.9k, False: 0]
  ------------------
  988|  54.9k|    set_registers(unwind_exception, context, results);
  989|       |    // Cache base for calculating the address of ttype in __cxa_call_unexpected.
  990|  54.9k|    if (results.ttypeIndex < 0) {
  ------------------
  |  Branch (990:9): [True: 0, False: 54.9k]
  ------------------
  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|  54.9k|    return _URC_INSTALL_CONTEXT;
 1000|  54.9k|}
cxa_personality.cpp:_ZN10__cxxabiv1L13set_registersEP17_Unwind_ExceptionP15_Unwind_ContextRKNS_12_GLOBAL__N_112scan_resultsE:
  549|   110k|{
  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|   110k|  _Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
  557|   110k|                reinterpret_cast<uintptr_t>(unwind_exception));
  558|   110k|  _Unwind_SetGR(context, __builtin_eh_return_data_regno(1),
  559|   110k|                static_cast<uintptr_t>(results.ttypeIndex));
  560|   110k|  _Unwind_SetIP(context, results.landingPad);
  561|   110k|}
cxa_personality.cpp:_ZN10__cxxabiv1L11scan_eh_tabERNS_12_GLOBAL__N_112scan_resultsE14_Unwind_ActionbP17_Unwind_ExceptionP15_Unwind_Context:
  587|   356k|                        _Unwind_Context *context) {
  588|       |    // Initialize results to found nothing but an error
  589|   356k|    results.ttypeIndex = 0;
  590|   356k|    results.actionRecord = 0;
  591|   356k|    results.languageSpecificData = 0;
  592|   356k|    results.landingPad = 0;
  593|   356k|    results.adjustedPtr = 0;
  594|   356k|    results.reason = _URC_FATAL_PHASE1_ERROR;
  595|       |    // Check for consistent actions
  596|   356k|    if (actions & _UA_SEARCH_PHASE)
  ------------------
  |  Branch (596:9): [True: 178k, False: 177k]
  ------------------
  597|   178k|    {
  598|       |        // Do Phase 1
  599|   178k|        if (actions & (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME | _UA_FORCE_UNWIND))
  ------------------
  |  Branch (599:13): [True: 0, False: 178k]
  ------------------
  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|   178k|    }
  607|   177k|    else if (actions & _UA_CLEANUP_PHASE)
  ------------------
  |  Branch (607:14): [True: 177k, False: 0]
  ------------------
  608|   177k|    {
  609|   177k|        if ((actions & _UA_HANDLER_FRAME) && (actions & _UA_FORCE_UNWIND))
  ------------------
  |  Branch (609:13): [True: 0, False: 177k]
  |  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|   177k|    }
  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|   356k|    const uint8_t *lsda = (const uint8_t *)_Unwind_GetLanguageSpecificData(context);
  627|   356k|    if (lsda == 0)
  ------------------
  |  Branch (627:9): [True: 0, False: 356k]
  ------------------
  628|      0|    {
  629|       |        // There is no exception table
  630|      0|        results.reason = _URC_CONTINUE_UNWIND;
  631|      0|        return;
  632|      0|    }
  633|   356k|    results.languageSpecificData = lsda;
  634|       |#if defined(_AIX)
  635|       |    uintptr_t base = _Unwind_GetDataRelBase(context);
  636|       |#else
  637|   356k|    uintptr_t base = 0;
  638|   356k|#endif
  639|       |    // Get the current instruction pointer and offset it before next
  640|       |    // instruction in the current frame which threw the exception.
  641|   356k|    uintptr_t ip = _Unwind_GetIP(context) - 1;
  642|       |    // Get beginning current frame's code (as defined by the
  643|       |    // emitted dwarf code)
  644|   356k|    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|   356k|    uintptr_t ipOffset = ip - funcStart;
  657|   356k|#endif // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
  658|   356k|    const uint8_t* classInfo = NULL;
  659|       |    // Note: See JITDwarfEmitter::EmitExceptionTable(...) for corresponding
  660|       |    //       dwarf emission
  661|       |    // Parse LSDA header.
  662|   356k|    uint8_t lpStartEncoding = *lsda++;
  663|   356k|    const uint8_t* lpStart = lpStartEncoding == DW_EH_PE_omit
  ------------------
  |  Branch (663:30): [True: 356k, False: 0]
  ------------------
  664|   356k|                                 ? (const uint8_t*)funcStart
  665|   356k|                                 : (const uint8_t*)readEncodedPointer(&lsda, lpStartEncoding, base);
  666|   356k|    uint8_t ttypeEncoding = *lsda++;
  667|   356k|    if (ttypeEncoding != DW_EH_PE_omit)
  ------------------
  |  Branch (667:9): [True: 79.4k, False: 276k]
  ------------------
  668|  79.4k|    {
  669|       |        // Calculate type info locations in emitted dwarf code which
  670|       |        // were flagged by type info arguments to llvm.eh.selector
  671|       |        // intrinsic
  672|  79.4k|        uintptr_t classInfoOffset = readULEB128(&lsda);
  673|  79.4k|        classInfo = lsda + classInfoOffset;
  674|  79.4k|    }
  675|       |    // Walk call-site table looking for range that
  676|       |    // includes current PC.
  677|   356k|    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|   356k|    uint32_t callSiteTableLength = static_cast<uint32_t>(readULEB128(&lsda));
  682|   356k|    const uint8_t* callSiteTableStart = lsda;
  683|   356k|    const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength;
  684|   356k|    const uint8_t* actionTableStart = callSiteTableEnd;
  685|   356k|    const uint8_t* callSitePtr = callSiteTableStart;
  686|  1.71M|    while (callSitePtr < callSiteTableEnd)
  ------------------
  |  Branch (686:12): [True: 1.71M, False: 0]
  ------------------
  687|  1.71M|    {
  688|       |        // There is one entry per call site.
  689|  1.71M|#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|  1.71M|        uintptr_t start = readEncodedPointer(&callSitePtr, callSiteEncoding);
  693|  1.71M|        uintptr_t length = readEncodedPointer(&callSitePtr, callSiteEncoding);
  694|  1.71M|        uintptr_t landingPad = readEncodedPointer(&callSitePtr, callSiteEncoding);
  695|  1.71M|        uintptr_t actionEntry = readULEB128(&callSitePtr);
  696|  1.71M|        if ((start <= ipOffset) && (ipOffset < (start + length)))
  ------------------
  |  Branch (696:13): [True: 1.71M, False: 0]
  |  Branch (696:36): [True: 356k, False: 1.36M]
  ------------------
  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|   356k|        {
  704|       |            // Found the call site containing ip.
  705|   356k|#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__)
  706|   356k|            if (landingPad == 0)
  ------------------
  |  Branch (706:17): [True: 190k, False: 165k]
  ------------------
  707|   190k|            {
  708|       |                // No handler here
  709|   190k|                results.reason = _URC_CONTINUE_UNWIND;
  710|   190k|                return;
  711|   190k|            }
  712|   165k|            landingPad = (uintptr_t)lpStart + landingPad;
  713|       |#else  // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
  714|       |            ++landingPad;
  715|       |#endif // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
  716|   165k|            results.landingPad = landingPad;
  717|   165k|            if (actionEntry == 0)
  ------------------
  |  Branch (717:17): [True: 101k, False: 64.4k]
  ------------------
  718|   101k|            {
  719|       |                // Found a cleanup
  720|   101k|                results.reason = actions & _UA_SEARCH_PHASE
  ------------------
  |  Branch (720:34): [True: 50.5k, False: 50.5k]
  ------------------
  721|   101k|                                     ? _URC_CONTINUE_UNWIND
  722|   101k|                                     : _URC_HANDLER_FOUND;
  723|   101k|                return;
  724|   101k|            }
  725|       |            // Convert 1-based byte offset into
  726|  64.4k|            const uint8_t* action = actionTableStart + (actionEntry - 1);
  727|  64.4k|            bool hasCleanup = false;
  728|       |            // Scan action entries until you find a matching handler, cleanup, or the end of action list
  729|  78.4k|            while (true)
  ------------------
  |  Branch (729:20): [True: 78.4k, Folded]
  ------------------
  730|  78.4k|            {
  731|  78.4k|                const uint8_t* actionRecord = action;
  732|  78.4k|                int64_t ttypeIndex = readSLEB128(&action);
  733|  78.4k|                if (ttypeIndex > 0)
  ------------------
  |  Branch (733:21): [True: 69.7k, False: 8.75k]
  ------------------
  734|  69.7k|                {
  735|       |                    // Found a catch, does it actually catch?
  736|       |                    // First check for catch (...)
  737|  69.7k|                    const __shim_type_info* catchType =
  738|  69.7k|                        get_shim_type_info(static_cast<uint64_t>(ttypeIndex),
  739|  69.7k|                                           classInfo, ttypeEncoding,
  740|  69.7k|                                           native_exception, unwind_exception,
  741|  69.7k|                                           base);
  742|  69.7k|                    if (catchType == 0)
  ------------------
  |  Branch (742:25): [True: 0, False: 69.7k]
  ------------------
  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|  69.7k|                    else if (native_exception)
  ------------------
  |  Branch (758:30): [True: 69.7k, False: 0]
  ------------------
  759|  69.7k|                    {
  760|  69.7k|                        __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1;
  761|  69.7k|                        void* adjustedPtr = get_thrown_object_ptr(unwind_exception);
  762|  69.7k|                        const __shim_type_info* excpType =
  763|  69.7k|                            static_cast<const __shim_type_info*>(exception_header->exceptionType);
  764|  69.7k|                        if (adjustedPtr == 0 || excpType == 0)
  ------------------
  |  Branch (764:29): [True: 0, False: 69.7k]
  |  Branch (764:49): [True: 0, False: 69.7k]
  ------------------
  765|      0|                        {
  766|       |                            // Something very bad happened
  767|      0|                            call_terminate(native_exception, unwind_exception);
  768|      0|                        }
  769|  69.7k|                        if (catchType->can_catch(excpType, adjustedPtr))
  ------------------
  |  Branch (769:29): [True: 55.6k, False: 14.0k]
  ------------------
  770|  55.6k|                        {
  771|       |                            // Found a matching handler. This is either search
  772|       |                            // phase or forced unwinding.
  773|  55.6k|                            assert(actions &
  ------------------
  |  Branch (773:29): [True: 55.6k, False: 0]
  ------------------
  774|  55.6k|                                   (_UA_SEARCH_PHASE | _UA_FORCE_UNWIND));
  775|  55.6k|                            results.ttypeIndex = ttypeIndex;
  776|  55.6k|                            results.actionRecord = actionRecord;
  777|  55.6k|                            results.adjustedPtr = adjustedPtr;
  778|  55.6k|                            results.reason = _URC_HANDLER_FOUND;
  779|  55.6k|                            return;
  780|  55.6k|                        }
  781|  69.7k|                    }
  782|       |                    // Scan next action ...
  783|  69.7k|                }
  784|  8.75k|                else if (ttypeIndex < 0)
  ------------------
  |  Branch (784:26): [True: 0, False: 8.75k]
  ------------------
  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|  8.75k|                } else {
  825|  8.75k|                    hasCleanup = true;
  826|  8.75k|                }
  827|  22.8k|                const uint8_t* temp = action;
  828|  22.8k|                int64_t actionOffset = readSLEB128(&temp);
  829|  22.8k|                if (actionOffset == 0)
  ------------------
  |  Branch (829:21): [True: 8.82k, False: 13.9k]
  ------------------
  830|  8.82k|                {
  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|  8.82k|                    results.reason = hasCleanup && actions & _UA_CLEANUP_PHASE
  ------------------
  |  Branch (834:38): [True: 8.75k, False: 66]
  |  Branch (834:52): [True: 4.37k, False: 4.37k]
  ------------------
  835|  8.82k|                                         ? _URC_HANDLER_FOUND
  836|  8.82k|                                         : _URC_CONTINUE_UNWIND;
  837|  8.82k|                    return;
  838|  8.82k|                }
  839|       |                // Go to next action
  840|  13.9k|                action += actionOffset;
  841|  13.9k|            }  // there is no break out of this loop, only return
  842|  64.4k|        }
  843|  1.36M|#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__)
  844|  1.36M|        else if (ipOffset < start)
  ------------------
  |  Branch (844:18): [True: 0, False: 1.36M]
  ------------------
  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|  1.71M|#endif // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
  852|  1.71M|    }  // 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|   101k|{
  232|   101k|    uintptr_t result = 0;
  233|   101k|    uintptr_t shift = 0;
  234|   101k|    unsigned char byte;
  235|   101k|    const uint8_t *p = *data;
  236|   101k|    do
  237|   101k|    {
  238|   101k|        byte = *p++;
  239|   101k|        result |= static_cast<uintptr_t>(byte & 0x7F) << shift;
  240|   101k|        shift += 7;
  241|   101k|    } while (byte & 0x80);
  ------------------
  |  Branch (241:14): [True: 0, False: 101k]
  ------------------
  242|   101k|    *data = p;
  243|   101k|    if ((byte & 0x40) && (shift < (sizeof(result) << 3)))
  ------------------
  |  Branch (243:9): [True: 13.9k, False: 87.2k]
  |  Branch (243:26): [True: 13.9k, False: 0]
  ------------------
  244|  13.9k|        result |= static_cast<uintptr_t>(~0) << shift;
  245|   101k|    return static_cast<intptr_t>(result);
  246|   101k|}
cxa_personality.cpp:_ZN10__cxxabiv1L18get_shim_type_infoEmPKhhbP17_Unwind_Exceptionm:
  389|  69.7k|{
  390|  69.7k|    if (classInfo == 0)
  ------------------
  |  Branch (390:9): [True: 0, False: 69.7k]
  ------------------
  391|      0|    {
  392|       |        // this should not happen.  Indicates corrupted eh_table.
  393|      0|        call_terminate(native_exception, unwind_exception);
  394|      0|    }
  395|  69.7k|    switch (ttypeEncoding & 0x0F)
  396|  69.7k|    {
  397|      0|    case DW_EH_PE_absptr:
  ------------------
  |  Branch (397:5): [True: 0, False: 69.7k]
  ------------------
  398|      0|        ttypeIndex *= sizeof(void*);
  399|      0|        break;
  400|      0|    case DW_EH_PE_udata2:
  ------------------
  |  Branch (400:5): [True: 0, False: 69.7k]
  ------------------
  401|      0|    case DW_EH_PE_sdata2:
  ------------------
  |  Branch (401:5): [True: 0, False: 69.7k]
  ------------------
  402|      0|        ttypeIndex *= 2;
  403|      0|        break;
  404|      0|    case DW_EH_PE_udata4:
  ------------------
  |  Branch (404:5): [True: 0, False: 69.7k]
  ------------------
  405|  69.7k|    case DW_EH_PE_sdata4:
  ------------------
  |  Branch (405:5): [True: 69.7k, False: 0]
  ------------------
  406|  69.7k|        ttypeIndex *= 4;
  407|  69.7k|        break;
  408|      0|    case DW_EH_PE_udata8:
  ------------------
  |  Branch (408:5): [True: 0, False: 69.7k]
  ------------------
  409|      0|    case DW_EH_PE_sdata8:
  ------------------
  |  Branch (409:5): [True: 0, False: 69.7k]
  ------------------
  410|      0|        ttypeIndex *= 8;
  411|      0|        break;
  412|      0|    default:
  ------------------
  |  Branch (412:5): [True: 0, False: 69.7k]
  ------------------
  413|       |        // this should not happen.   Indicates corrupted eh_table.
  414|      0|        call_terminate(native_exception, unwind_exception);
  415|  69.7k|    }
  416|  69.7k|    classInfo -= ttypeIndex;
  417|  69.7k|    return (const __shim_type_info*)readEncodedPointer(&classInfo,
  418|  69.7k|                                                       ttypeEncoding, base);
  419|  69.7k|}
cxa_personality.cpp:_ZN10__cxxabiv1L21get_thrown_object_ptrEP17_Unwind_Exception:
  518|  69.7k|{
  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|  69.7k|    void* adjustedPtr = unwind_exception + 1;
  522|  69.7k|    if (__getExceptionClass(unwind_exception) == kOurDependentExceptionClass)
  ------------------
  |  Branch (522:9): [True: 0, False: 69.7k]
  ------------------
  523|      0|        adjustedPtr = ((__cxa_dependent_exception*)adjustedPtr - 1)->primaryException;
  524|  69.7k|    return adjustedPtr;
  525|  69.7k|}
cxa_personality.cpp:_ZN10__cxxabiv1L18readEncodedPointerEPPKhhm:
  258|  5.22M|{
  259|  5.22M|    uintptr_t result = 0;
  260|  5.22M|    if (encoding == DW_EH_PE_omit)
  ------------------
  |  Branch (260:9): [True: 0, False: 5.22M]
  ------------------
  261|      0|        return result;
  262|  5.22M|    const uint8_t* p = *data;
  263|       |    // first get value
  264|  5.22M|    switch (encoding & 0x0F)
  265|  5.22M|    {
  266|      0|    case DW_EH_PE_absptr:
  ------------------
  |  Branch (266:5): [True: 0, False: 5.22M]
  ------------------
  267|      0|        result = readPointerHelper<uintptr_t>(p);
  268|      0|        break;
  269|  5.15M|    case DW_EH_PE_uleb128:
  ------------------
  |  Branch (269:5): [True: 5.15M, False: 69.7k]
  ------------------
  270|  5.15M|        result = readULEB128(&p);
  271|  5.15M|        break;
  272|      0|    case DW_EH_PE_sleb128:
  ------------------
  |  Branch (272:5): [True: 0, False: 5.22M]
  ------------------
  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: 5.22M]
  ------------------
  276|      0|        result = readPointerHelper<uint16_t>(p);
  277|      0|        break;
  278|      0|    case DW_EH_PE_udata4:
  ------------------
  |  Branch (278:5): [True: 0, False: 5.22M]
  ------------------
  279|      0|        result = readPointerHelper<uint32_t>(p);
  280|      0|        break;
  281|      0|    case DW_EH_PE_udata8:
  ------------------
  |  Branch (281:5): [True: 0, False: 5.22M]
  ------------------
  282|      0|        result = readPointerHelper<uint64_t>(p);
  283|      0|        break;
  284|      0|    case DW_EH_PE_sdata2:
  ------------------
  |  Branch (284:5): [True: 0, False: 5.22M]
  ------------------
  285|      0|        result = readPointerHelper<int16_t>(p);
  286|      0|        break;
  287|  69.7k|    case DW_EH_PE_sdata4:
  ------------------
  |  Branch (287:5): [True: 69.7k, False: 5.15M]
  ------------------
  288|  69.7k|        result = readPointerHelper<int32_t>(p);
  289|  69.7k|        break;
  290|      0|    case DW_EH_PE_sdata8:
  ------------------
  |  Branch (290:5): [True: 0, False: 5.22M]
  ------------------
  291|      0|        result = readPointerHelper<int64_t>(p);
  292|      0|        break;
  293|      0|    default:
  ------------------
  |  Branch (293:5): [True: 0, False: 5.22M]
  ------------------
  294|       |        // not supported
  295|      0|        abort();
  296|      0|        break;
  297|  5.22M|    }
  298|       |    // then add relative offset
  299|  5.22M|    switch (encoding & 0x70)
  300|  5.22M|    {
  301|  5.15M|    case DW_EH_PE_absptr:
  ------------------
  |  Branch (301:5): [True: 5.15M, False: 69.7k]
  ------------------
  302|       |        // do nothing
  303|  5.15M|        break;
  304|  69.7k|    case DW_EH_PE_pcrel:
  ------------------
  |  Branch (304:5): [True: 69.7k, False: 5.15M]
  ------------------
  305|  69.7k|        if (result)
  ------------------
  |  Branch (305:13): [True: 69.7k, False: 0]
  ------------------
  306|  69.7k|            result += (uintptr_t)(*data);
  307|  69.7k|        break;
  308|      0|    case DW_EH_PE_datarel:
  ------------------
  |  Branch (308:5): [True: 0, False: 5.22M]
  ------------------
  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: 5.22M]
  ------------------
  314|      0|    case DW_EH_PE_funcrel:
  ------------------
  |  Branch (314:5): [True: 0, False: 5.22M]
  ------------------
  315|      0|    case DW_EH_PE_aligned:
  ------------------
  |  Branch (315:5): [True: 0, False: 5.22M]
  ------------------
  316|      0|    default:
  ------------------
  |  Branch (316:5): [True: 0, False: 5.22M]
  ------------------
  317|       |        // not supported
  318|      0|        abort();
  319|      0|        break;
  320|  5.22M|    }
  321|       |    // then apply indirection
  322|  5.22M|    if (result && (encoding & DW_EH_PE_indirect))
  ------------------
  |  Branch (322:9): [True: 4.37M, False: 852k]
  |  Branch (322:19): [True: 69.7k, False: 4.30M]
  ------------------
  323|  69.7k|        result = *((uintptr_t*)result);
  324|  5.22M|    *data = p;
  325|  5.22M|    return result;
  326|  5.22M|}
cxa_personality.cpp:_ZN10__cxxabiv112_GLOBAL__N_117readPointerHelperIiEEmRPKh:
  163|  69.7k|uintptr_t readPointerHelper(const uint8_t*& p) {
  164|  69.7k|    AsType value;
  165|  69.7k|    memcpy(&value, p, sizeof(AsType));
  166|  69.7k|    p += sizeof(AsType);
  167|  69.7k|    return static_cast<uintptr_t>(value);
  168|  69.7k|}
cxa_personality.cpp:_ZN10__cxxabiv1L11readULEB128EPPKh:
  208|  7.30M|{
  209|  7.30M|    uintptr_t result = 0;
  210|  7.30M|    uintptr_t shift = 0;
  211|  7.30M|    unsigned char byte;
  212|  7.30M|    const uint8_t *p = *data;
  213|  7.30M|    do
  214|  10.0M|    {
  215|  10.0M|        byte = *p++;
  216|  10.0M|        result |= static_cast<uintptr_t>(byte & 0x7F) << shift;
  217|  10.0M|        shift += 7;
  218|  10.0M|    } while (byte & 0x80);
  ------------------
  |  Branch (218:14): [True: 2.77M, False: 7.30M]
  ------------------
  219|  7.30M|    *data = p;
  220|  7.30M|    return result;
  221|  7.30M|}

_ZN10__cxxabiv130__aligned_malloc_with_fallbackEm:
  258|  55.6k|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|  55.6k|  if (size == 0)
  ------------------
  |  Branch (266:7): [True: 0, False: 55.6k]
  ------------------
  267|      0|    size = 1;
  268|  55.6k|  if (void* dest = std::__libcpp_aligned_alloc(__alignof(__aligned_type), size))
  ------------------
  |  Branch (268:13): [True: 55.6k, False: 0]
  ------------------
  269|  55.6k|    return dest;
  270|      0|#endif
  271|      0|  return fallback_malloc(size);
  272|  55.6k|}
_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|  55.6k|void __aligned_free_with_fallback(void* ptr) {
  286|  55.6k|  if (is_fallback_ptr(ptr))
  ------------------
  |  Branch (286:7): [True: 0, False: 55.6k]
  ------------------
  287|      0|    fallback_free(ptr);
  288|  55.6k|  else {
  289|       |#if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
  290|       |    ::free(ptr);
  291|       |#else
  292|  55.6k|    std::__libcpp_aligned_free(ptr);
  293|  55.6k|#endif
  294|  55.6k|  }
  295|  55.6k|}
fallback_malloc.cpp:_ZN12_GLOBAL__N_115is_fallback_ptrEPv:
  128|  55.6k|bool is_fallback_ptr(void* ptr) {
  129|  55.6k|  return ptr >= heap && ptr < (heap + HEAP_SIZE);
  ------------------
  |  Branch (129:10): [True: 55.6k, False: 0]
  |  Branch (129:25): [True: 0, False: 55.6k]
  ------------------
  130|  55.6k|}

_ZNK10__cxxabiv117__class_type_info9can_catchEPKNS_16__shim_type_infoERPv:
  464|  69.7k|{
  465|       |    // bullet 1
  466|  69.7k|    if (is_equal(this, thrown_type, false))
  ------------------
  |  Branch (466:9): [True: 29.0k, False: 40.6k]
  ------------------
  467|  29.0k|        return true;
  468|  40.6k|    const __class_type_info* thrown_class_type =
  469|  40.6k|        dynamic_cast<const __class_type_info*>(thrown_type);
  470|  40.6k|    if (thrown_class_type == 0)
  ------------------
  |  Branch (470:9): [True: 0, False: 40.6k]
  ------------------
  471|      0|        return false;
  472|       |    // bullet 2
  473|  40.6k|    assert(adjustedPtr && "catching a class without an object?");
  ------------------
  |  Branch (473:5): [True: 40.6k, False: 0]
  |  Branch (473:5): [True: 40.6k, Folded]
  |  Branch (473:5): [True: 40.6k, False: 0]
  ------------------
  474|  40.6k|    __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|  40.6k|    info.number_of_dst_type = 1;
  476|  40.6k|    thrown_class_type->has_unambiguous_public_base(&info, adjustedPtr, public_path);
  477|  40.6k|    if (info.path_dst_ptr_to_static_ptr == public_path)
  ------------------
  |  Branch (477:9): [True: 26.5k, False: 14.0k]
  ------------------
  478|  26.5k|    {
  479|  26.5k|        adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
  480|  26.5k|        return true;
  481|  26.5k|    }
  482|  14.0k|    return false;
  483|  40.6k|}
_ZNK10__cxxabiv117__class_type_info24process_found_base_classEPNS_19__dynamic_cast_infoEPvi:
  509|  26.5k|{
  510|  26.5k|  if (info->number_to_static_ptr == 0) {
  ------------------
  |  Branch (510:7): [True: 26.5k, False: 0]
  ------------------
  511|       |    // First time we found this base
  512|  26.5k|    info->dst_ptr_leading_to_static_ptr = adjustedPtr;
  513|  26.5k|    info->path_dst_ptr_to_static_ptr = path_below;
  514|       |    // stash the virtual base cookie.
  515|  26.5k|    info->dst_ptr_not_leading_to_static_ptr = info->vbase_cookie;
  516|  26.5k|    info->number_to_static_ptr = 1;
  517|  26.5k|  } 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|  26.5k|}
_ZNK10__cxxabiv117__class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi:
  535|  14.0k|{
  536|  14.0k|    if (is_equal(this, info->static_type, false))
  ------------------
  |  Branch (536:9): [True: 0, False: 14.0k]
  ------------------
  537|      0|        process_found_base_class(info, adjustedPtr, path_below);
  538|  14.0k|}
_ZNK10__cxxabiv120__si_class_type_info27has_unambiguous_public_baseEPNS_19__dynamic_cast_infoEPvi:
  544|   119k|{
  545|   119k|    if (is_equal(this, info->static_type, false))
  ------------------
  |  Branch (545:9): [True: 26.5k, False: 92.5k]
  ------------------
  546|  26.5k|        process_found_base_class(info, adjustedPtr, path_below);
  547|  92.5k|    else
  548|  92.5k|        __base_type->has_unambiguous_public_base(info, adjustedPtr, path_below);
  549|   119k|}
__dynamic_cast:
  899|  40.6k|               std::ptrdiff_t src2dst_offset) {
  900|       |    // Get (dynamic_ptr, dynamic_type) from static_ptr
  901|  40.6k|    derived_object_info derived_info;
  902|  40.6k|    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|  40.6k|    const void* dst_ptr = 0;
  908|       |
  909|       |    // Find out if we can use a giant short cut in the search
  910|  40.6k|    if (is_equal(derived_info.dynamic_type, dst_type, false))
  ------------------
  |  Branch (910:9): [True: 0, False: 40.6k]
  ------------------
  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|  40.6k|    else
  920|  40.6k|    {
  921|       |        // Optimize toward downcasting: let's first try to do a downcast before
  922|       |        //   falling back to the slow path.
  923|  40.6k|        dst_ptr = dyn_cast_try_downcast(static_ptr,
  924|  40.6k|                                        derived_info.dynamic_ptr,
  925|  40.6k|                                        dst_type,
  926|  40.6k|                                        derived_info.dynamic_type,
  927|  40.6k|                                        src2dst_offset);
  928|       |
  929|  40.6k|        if (!dst_ptr)
  ------------------
  |  Branch (929:13): [True: 0, False: 40.6k]
  ------------------
  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|  40.6k|    }
  939|       |
  940|  40.6k|    return const_cast<void*>(dst_ptr);
  941|  40.6k|}
_ZNK10__cxxabiv117__class_type_info29process_static_type_above_dstEPNS_19__dynamic_cast_infoEPKvS4_i:
  961|  40.6k|{
  962|       |    // Record that we found a static_type
  963|  40.6k|    info->found_any_static_type = true;
  964|  40.6k|    if (current_ptr == info->static_ptr)
  ------------------
  |  Branch (964:9): [True: 40.6k, False: 0]
  ------------------
  965|  40.6k|    {
  966|       |        // Record that we found (static_ptr, static_type)
  967|  40.6k|        info->found_our_static_ptr = true;
  968|  40.6k|        if (info->dst_ptr_leading_to_static_ptr == 0)
  ------------------
  |  Branch (968:13): [True: 40.6k, False: 0]
  ------------------
  969|  40.6k|        {
  970|       |            // First time here
  971|  40.6k|            info->dst_ptr_leading_to_static_ptr = dst_ptr;
  972|  40.6k|            info->path_dst_ptr_to_static_ptr = path_below;
  973|  40.6k|            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|  40.6k|            if (info->number_of_dst_type == 1 && info->path_dst_ptr_to_static_ptr == public_path)
  ------------------
  |  Branch (976:17): [True: 40.6k, False: 0]
  |  Branch (976:50): [True: 40.6k, False: 0]
  ------------------
  977|  40.6k|                info->search_done = true;
  978|  40.6k|        }
  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|  40.6k|    }
  997|  40.6k|}
_ZNK10__cxxabiv120__si_class_type_info16search_above_dstEPNS_19__dynamic_cast_infoEPKvS4_ib:
 1469|  81.2k|{
 1470|  81.2k|    if (is_equal(this, info->static_type, use_strcmp))
  ------------------
  |  Branch (1470:9): [True: 40.6k, False: 40.6k]
  ------------------
 1471|  40.6k|        process_static_type_above_dst(info, dst_ptr, current_ptr, path_below);
 1472|  40.6k|    else
 1473|  40.6k|        __base_type->search_above_dst(info, dst_ptr, current_ptr, path_below, use_strcmp);
 1474|  81.2k|}
private_typeinfo.cpp:_ZL8is_equalPKSt9type_infoS1_b:
   57|   324k|{
   58|       |    // Use std::type_info's default comparison unless we've explicitly asked
   59|       |    // for strcmp.
   60|   324k|    if (!use_strcmp)
  ------------------
  |  Branch (60:9): [True: 324k, False: 0]
  ------------------
   61|   324k|        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|   324k|}
private_typeinfo.cpp:_ZN10__cxxabiv112_GLOBAL__N_125dyn_cast_get_derived_infoEPNS0_19derived_object_infoEPKv:
   89|  40.6k|{
   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|  40.6k|    void **vtable = *static_cast<void ** const *>(static_ptr);
  106|  40.6k|    info->offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]);
  107|  40.6k|    info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived;
  108|  40.6k|    info->dynamic_type = static_cast<const __class_type_info*>(vtable[-1]);
  109|  40.6k|#endif
  110|  40.6k|}
private_typeinfo.cpp:_ZN10__cxxabiv112_GLOBAL__N_121dyn_cast_try_downcastEPKvS2_PKNS_17__class_type_infoES5_l:
  205|  40.6k|{
  206|  40.6k|    if (src2dst_offset < 0)
  ------------------
  |  Branch (206:9): [True: 0, False: 40.6k]
  ------------------
  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|  40.6k|    const void* dst_ptr_to_static = reinterpret_cast<const char*>(static_ptr) - src2dst_offset;
  217|       |
  218|  40.6k|    if (reinterpret_cast<std::intptr_t>(dst_ptr_to_static) < reinterpret_cast<std::intptr_t>(dynamic_ptr))
  ------------------
  |  Branch (218:9): [True: 0, False: 40.6k]
  ------------------
  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|  40.6k|    __dynamic_cast_info dynamic_to_dst_info = {dynamic_type,
  226|  40.6k|                                               dst_ptr_to_static,
  227|  40.6k|                                               dst_type,
  228|  40.6k|                                               src2dst_offset,
  229|  40.6k|                                               0,
  230|  40.6k|                                               0,
  231|  40.6k|                                               0,
  232|  40.6k|                                               0,
  233|  40.6k|                                               0,
  234|  40.6k|                                               0,
  235|  40.6k|                                               0,
  236|  40.6k|                                               0,
  237|  40.6k|                                               1, // number_of_dst_type
  238|  40.6k|                                               false,
  239|  40.6k|                                               false,
  240|  40.6k|                                               false,
  241|  40.6k|                                               true,
  242|  40.6k|                                               nullptr};
  243|  40.6k|    dynamic_type->search_above_dst(&dynamic_to_dst_info, dynamic_ptr, dynamic_ptr, public_path, false);
  244|  40.6k|    if (dynamic_to_dst_info.path_dst_ptr_to_static_ptr != unknown) {
  ------------------
  |  Branch (244:9): [True: 40.6k, False: 0]
  ------------------
  245|       |        // We have found at least one path from dynamic_ptr to dst_ptr. The
  246|       |        //   downcast can succeed.
  247|  40.6k|        return dst_ptr_to_static;
  248|  40.6k|    }
  249|       |
  250|      0|    return nullptr;
  251|  40.6k|}

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

_Znwm:
   66|   278k|_LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC {
   67|   278k|  void* p = operator_new_impl(size);
   68|   278k|  if (p == nullptr)
  ------------------
  |  Branch (68:7): [True: 0, False: 278k]
  ------------------
   69|      0|    __throw_bad_alloc_shim();
   70|   278k|  return p;
   71|   278k|}
_ZdlPv:
  125|   278k|_LIBCPP_WEAK void operator delete(void* ptr) noexcept { std::free(ptr); }
_ZdlPvm:
  129|   222k|_LIBCPP_WEAK void operator delete(void* ptr, size_t) noexcept { ::operator delete(ptr); }
stdlib_new_delete.cpp:_ZL17operator_new_implm:
   50|   278k|static void* operator_new_impl(std::size_t size) {
   51|   278k|  if (size == 0)
  ------------------
  |  Branch (51:7): [True: 0, False: 278k]
  ------------------
   52|      0|    size = 1;
   53|   278k|  void* p;
   54|   278k|  while ((p = std::malloc(size)) == nullptr) {
  ------------------
  |  Branch (54:10): [True: 0, False: 278k]
  ------------------
   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|   278k|  return p;
   64|   278k|}

_ZNSt13runtime_errorD2Ev:
   30|  55.6k|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|  3.08k|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|  1.54k|void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
 2420|  1.54k|#if KMP_USE_DYNAMIC_LOCK
 2421|       |
 2422|  1.54k|  KMP_DEBUG_ASSERT(__kmp_init_serial);
 2423|  1.54k|  if (__kmp_env_consistency_check && user_lock == NULL) {
  ------------------
  |  Branch (2423:7): [True: 0, False: 1.54k]
  |  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|  1.54k|  __kmp_init_lock_with_hint(loc, user_lock, __kmp_user_lock_seq);
 2427|       |
 2428|  1.54k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 2429|       |  // This is the case, if called from omp_init_lock_with_hint:
 2430|  1.54k|  void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
  ------------------
  |  |   93|  1.54k|#define OMPT_LOAD_RETURN_ADDRESS(gtid) __ompt_load_return_address(gtid)
  ------------------
 2431|  1.54k|  if (!codeptr)
  ------------------
  |  Branch (2431:7): [True: 1.54k, False: 0]
  ------------------
 2432|  1.54k|    codeptr = OMPT_GET_RETURN_ADDRESS(0);
  ------------------
  |  |  108|  1.54k|#define OMPT_GET_RETURN_ADDRESS(level) __builtin_return_address(level)
  ------------------
 2433|  1.54k|  if (ompt_enabled.ompt_callback_lock_init) {
  ------------------
  |  Branch (2433:7): [True: 0, False: 1.54k]
  ------------------
 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|  1.54k|#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|  1.54k|} // __kmpc_init_lock
__kmpc_destroy_lock:
 2565|  1.54k|void __kmpc_destroy_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) {
 2566|  1.54k|#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|  1.54k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 2578|       |  // This is the case, if called from omp_init_lock_with_hint:
 2579|  1.54k|  void *codeptr = OMPT_LOAD_RETURN_ADDRESS(gtid);
  ------------------
  |  |   93|  1.54k|#define OMPT_LOAD_RETURN_ADDRESS(gtid) __ompt_load_return_address(gtid)
  ------------------
 2580|  1.54k|  if (!codeptr)
  ------------------
  |  Branch (2580:7): [True: 1.54k, False: 0]
  ------------------
 2581|  1.54k|    codeptr = OMPT_GET_RETURN_ADDRESS(0);
  ------------------
  |  |  108|  1.54k|#define OMPT_GET_RETURN_ADDRESS(level) __builtin_return_address(level)
  ------------------
 2582|  1.54k|  if (ompt_enabled.ompt_callback_lock_destroy) {
  ------------------
  |  Branch (2582:7): [True: 0, False: 1.54k]
  ------------------
 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|  1.54k|#endif
 2587|  1.54k|  KMP_D_LOCK_FUNC(user_lock, destroy)((kmp_dyna_lock_t *)user_lock);
  ------------------
  |  | 1149|  1.54k|#define KMP_D_LOCK_FUNC(l, op) __kmp_direct_##op[KMP_EXTRACT_D_TAG(l)]
  |  |  ------------------
  |  |  |  | 1141|  1.54k|  (*((kmp_dyna_lock_t *)(l)) & ((1 << KMP_LOCK_SHIFT) - 1) &                   \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1076|  1.54k|  8 // number of low bits to be used as tag for direct locks
  |  |  |  |  ------------------
  |  |  |  | 1142|  1.54k|   -(*((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|  1.54k|} // __kmpc_destroy_lock
kmp_csupport.cpp:_ZL25__kmp_init_lock_with_hintP5identPPv18kmp_dyna_lockseq_t:
 2315|  1.54k|                                                    kmp_dyna_lockseq_t seq) {
 2316|  1.54k|  if (KMP_IS_D_LOCK(seq)) {
  ------------------
  |  | 1104|  1.54k|  ((seq) >= KMP_FIRST_D_LOCK && (seq) <= KMP_LAST_D_LOCK)
  |  |  ------------------
  |  |  |  | 1077|  3.08k|#define KMP_FIRST_D_LOCK lockseq_tas
  |  |  ------------------
  |  |                 ((seq) >= KMP_FIRST_D_LOCK && (seq) <= KMP_LAST_D_LOCK)
  |  |  ------------------
  |  |  |  | 1057|  1.54k|#define KMP_LAST_D_LOCK lockseq_rtm_spin
  |  |  ------------------
  |  |  |  Branch (1104:4): [True: 1.54k, False: 0]
  |  |  |  Branch (1104:33): [True: 0, False: 1.54k]
  |  |  ------------------
  ------------------
 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|  1.54k|  } else {
 2322|  1.54k|    KMP_INIT_I_LOCK(lock, seq);
  ------------------
  |  | 1162|  1.54k|  __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|  1.54k|  }
 2328|  1.54k|}

__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|  1.54k|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|  1.54k|  int gtid = __kmp_entry_gtid();
  ------------------
  |  | 3467|  1.54k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 1141|  1.54k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 1142|  1.54k|  OMPT_STORE_RETURN_ADDRESS(gtid);
  ------------------
  |  |   92|  1.54k|  OmptReturnAddressGuard ReturnAddressGuard{gtid, __builtin_return_address(0)};
  ------------------
 1143|  1.54k|#endif
 1144|       |  __kmpc_init_lock(NULL, gtid, user_lock);
 1145|  1.54k|#endif
 1146|  1.54k|}
omp_destroy_lock:
 1161|  1.54k|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|  1.54k|  int gtid = __kmp_entry_gtid();
  ------------------
  |  | 3467|  1.54k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 1166|  1.54k|#if OMPT_SUPPORT && OMPT_OPTIONAL
 1167|  1.54k|  OMPT_STORE_RETURN_ADDRESS(gtid);
  ------------------
  |  |   92|  1.54k|  OmptReturnAddressGuard ReturnAddressGuard{gtid, __builtin_return_address(0)};
  ------------------
 1168|  1.54k|#endif
 1169|       |  __kmpc_destroy_lock(NULL, gtid, user_lock);
 1170|  1.54k|#endif
 1171|  1.54k|}

__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|  3.08k|int __kmp_acquire_ticket_lock(kmp_ticket_lock_t *lck, kmp_int32 gtid) {
  645|  3.08k|  int retval = __kmp_acquire_ticket_lock_timed_template(lck, gtid);
  646|  3.08k|  return retval;
  647|  3.08k|}
__kmp_release_ticket_lock:
  714|  3.08k|int __kmp_release_ticket_lock(kmp_ticket_lock_t *lck, kmp_int32 gtid) {
  715|  3.08k|  kmp_uint32 distance = std::atomic_load_explicit(&lck->lk.next_ticket,
  716|  3.08k|                                                  std::memory_order_relaxed) -
  717|  3.08k|                        std::atomic_load_explicit(&lck->lk.now_serving,
  718|  3.08k|                                                  std::memory_order_relaxed);
  719|       |
  720|  3.08k|  std::atomic_fetch_add_explicit(&lck->lk.now_serving, 1U,
  721|  3.08k|                                 std::memory_order_release);
  722|       |
  723|  3.08k|  KMP_YIELD(distance >
  ------------------
  |  | 1529|  3.08k|  {                                                                            \
  |  | 1530|  3.08k|    KMP_CPU_PAUSE();                                                           \
  |  |  ------------------
  |  |  |  | 1498|  3.08k|#define KMP_CPU_PAUSE() __kmp_x86_pause()
  |  |  ------------------
  |  | 1531|  6.17k|    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: 3.08k]
  |  |  |  Branch (1531:10): [True: 0, False: 3.08k]
  |  |  ------------------
  |  | 1532|  3.08k|      __kmp_yield();                                                           \
  |  | 1533|  3.08k|  }
  ------------------
  724|  3.08k|            (kmp_uint32)(__kmp_avail_proc ? __kmp_avail_proc : __kmp_xproc));
  725|  3.08k|  return KMP_LOCK_RELEASED;
  ------------------
  |  |  156|  3.08k|#define KMP_LOCK_RELEASED 1
  ------------------
  726|  3.08k|}
__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|  1.55k|void __kmp_init_queuing_lock(kmp_queuing_lock_t *lck) {
 1517|  1.55k|  lck->lk.location = NULL;
 1518|  1.55k|  lck->lk.head_id = 0;
 1519|  1.55k|  lck->lk.tail_id = 0;
 1520|  1.55k|  lck->lk.next_ticket = 0;
 1521|  1.55k|  lck->lk.now_serving = 0;
 1522|  1.55k|  lck->lk.owner_id = 0; // no thread owns the lock.
 1523|  1.55k|  lck->lk.depth_locked = -1; // >= 0 for nestable locks, -1 for simple locks.
 1524|  1.55k|  lck->lk.initialized = lck;
 1525|       |
 1526|  1.55k|  KA_TRACE(1000, ("__kmp_init_queuing_lock: lock %p initialized\n", lck));
 1527|  1.55k|}
__kmp_destroy_queuing_lock:
 1529|  1.54k|void __kmp_destroy_queuing_lock(kmp_queuing_lock_t *lck) {
 1530|  1.54k|  lck->lk.initialized = NULL;
 1531|       |  lck->lk.location = NULL;
 1532|  1.54k|  lck->lk.head_id = 0;
 1533|  1.54k|  lck->lk.tail_id = 0;
 1534|  1.54k|  lck->lk.next_ticket = 0;
 1535|  1.54k|  lck->lk.now_serving = 0;
 1536|  1.54k|  lck->lk.owner_id = 0;
 1537|  1.54k|  lck->lk.depth_locked = -1;
 1538|  1.54k|}
__kmp_allocate_indirect_lock:
 3122|  1.54k|                                                  kmp_indirect_locktag_t tag) {
 3123|  1.54k|  kmp_indirect_lock_t *lck;
 3124|  1.54k|  kmp_lock_index_t idx, table_idx;
 3125|       |
 3126|  1.54k|  __kmp_acquire_lock(&__kmp_global_lock, gtid);
 3127|       |
 3128|  1.54k|  if (__kmp_indirect_lock_pool[tag] != NULL) {
  ------------------
  |  Branch (3128:7): [True: 1.53k, False: 2]
  ------------------
 3129|       |    // Reuse the allocated and destroyed lock object
 3130|  1.53k|    lck = __kmp_indirect_lock_pool[tag];
 3131|  1.53k|    if (OMP_LOCK_T_SIZE < sizeof(void *))
  ------------------
  |  |   54|  1.53k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3131:9): [True: 1.53k, Folded]
  ------------------
 3132|  1.53k|      idx = lck->lock->pool.index;
 3133|  1.53k|    __kmp_indirect_lock_pool[tag] = (kmp_indirect_lock_t *)lck->lock->pool.next;
 3134|  1.53k|    KA_TRACE(20, ("__kmp_allocate_indirect_lock: reusing an existing lock %p\n",
 3135|  1.53k|                  lck));
 3136|  1.53k|  } 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|  1.54k|  __kmp_release_lock(&__kmp_global_lock, gtid);
 3179|       |
 3180|  1.54k|  lck->type = tag;
 3181|       |
 3182|  1.54k|  if (OMP_LOCK_T_SIZE < sizeof(void *)) {
  ------------------
  |  |   54|  1.54k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3182:7): [True: 1.54k, Folded]
  ------------------
 3183|  1.54k|    *((kmp_lock_index_t *)user_lock) = idx
 3184|  1.54k|                                       << 1; // indirect lock word must be even
 3185|  1.54k|  } else {
 3186|      0|    *((kmp_indirect_lock_t **)user_lock) = lck;
 3187|      0|  }
 3188|       |
 3189|  1.54k|  return lck;
 3190|  1.54k|}
__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|  3.08k|                                         kmp_int32 gtid) {
  626|  3.08k|  kmp_uint32 my_ticket = std::atomic_fetch_add_explicit(
  627|  3.08k|      &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|  3.08k|  if (std::atomic_load_explicit(&lck->lk.now_serving,
  ------------------
  |  Branch (636:7): [True: 3.08k, False: 0]
  ------------------
  637|  3.08k|                                std::memory_order_acquire) == my_ticket) {
  638|  3.08k|    return KMP_LOCK_ACQUIRED_FIRST;
  ------------------
  |  |  158|  3.08k|#define KMP_LOCK_ACQUIRED_FIRST 1
  ------------------
  639|  3.08k|  }
  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|  3.08k|}
kmp_lock.cpp:_ZL23__kmp_init_queuing_lockP13kmp_user_lock:
 2953|  1.54k|  static void __kmp_##op##_##lk##_##lock(kmp_user_lock_p lock) {               \
 2954|  1.54k|    __kmp_##op##_##lk##_##lock(&lock->lk);                                     \
 2955|  1.54k|  }
kmp_lock.cpp:_ZL24__kmp_init_indirect_lockPj18kmp_dyna_lockseq_t:
 3220|  1.54k|                                     kmp_dyna_lockseq_t seq) {
 3221|  1.54k|#if KMP_USE_ADAPTIVE_LOCKS
 3222|  1.54k|  if (seq == lockseq_adaptive && !__kmp_cpuinfo.flags.rtm) {
  ------------------
  |  Branch (3222:7): [True: 0, False: 1.54k]
  |  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|  1.54k|#endif
 3227|  1.54k|#if KMP_USE_TSX
 3228|  1.54k|  if (seq == lockseq_rtm_queuing && !__kmp_cpuinfo.flags.rtm) {
  ------------------
  |  Branch (3228:7): [True: 0, False: 1.54k]
  |  Branch (3228:37): [True: 0, False: 0]
  ------------------
 3229|      0|    seq = lockseq_queuing;
 3230|      0|  }
 3231|  1.54k|#endif
 3232|  1.54k|  kmp_indirect_locktag_t tag = KMP_GET_I_TAG(seq);
  ------------------
  |  | 1107|  1.54k|#define KMP_GET_I_TAG(seq) (kmp_indirect_locktag_t)((seq)-KMP_FIRST_I_LOCK)
  |  |  ------------------
  |  |  |  | 1078|  1.54k|#define KMP_FIRST_I_LOCK lockseq_ticket
  |  |  ------------------
  ------------------
 3233|  1.54k|  kmp_indirect_lock_t *l =
 3234|  1.54k|      __kmp_allocate_indirect_lock((void **)lock, __kmp_entry_gtid(), tag);
  ------------------
  |  | 3467|  1.54k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 3235|  1.54k|  KMP_I_LOCK_FUNC(l, init)(l->lock);
  ------------------
  |  | 1154|  1.54k|  __kmp_indirect_##op[((kmp_indirect_lock_t *)(l))->type]
  ------------------
 3236|  1.54k|  KA_TRACE(
 3237|  1.54k|      20, ("__kmp_init_indirect_lock: initialized indirect lock with type#%d\n",
 3238|  1.54k|           seq));
 3239|  1.54k|}
kmp_lock.cpp:_ZL26__kmp_lookup_indirect_lockPPvPKc:
 3194|  1.54k|__kmp_lookup_indirect_lock(void **user_lock, const char *func) {
 3195|  1.54k|  if (__kmp_env_consistency_check) {
  ------------------
  |  Branch (3195:7): [True: 0, False: 1.54k]
  ------------------
 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|  1.54k|  } else {
 3211|  1.54k|    if (OMP_LOCK_T_SIZE < sizeof(void *)) {
  ------------------
  |  |   54|  1.54k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3211:9): [True: 1.54k, Folded]
  ------------------
 3212|  1.54k|      return __kmp_get_i_lock(KMP_EXTRACT_I_INDEX(user_lock));
  ------------------
  |  | 1145|  1.54k|#define KMP_EXTRACT_I_INDEX(l) (*(kmp_lock_index_t *)(l) >> 1)
  ------------------
 3213|  1.54k|    } else {
 3214|      0|      return *((kmp_indirect_lock_t **)user_lock);
 3215|      0|    }
 3216|  1.54k|  }
 3217|  1.54k|}
kmp_lock.cpp:_ZL27__kmp_destroy_indirect_lockPj:
 3241|  1.54k|static void __kmp_destroy_indirect_lock(kmp_dyna_lock_t *lock) {
 3242|  1.54k|  kmp_uint32 gtid = __kmp_entry_gtid();
  ------------------
  |  | 3467|  1.54k|#define __kmp_entry_gtid() __kmp_get_global_thread_id_reg()
  ------------------
 3243|  1.54k|  kmp_indirect_lock_t *l =
 3244|  1.54k|      __kmp_lookup_indirect_lock((void **)lock, "omp_destroy_lock");
 3245|  1.54k|  KMP_I_LOCK_FUNC(l, destroy)(l->lock);
  ------------------
  |  | 1154|  1.54k|  __kmp_indirect_##op[((kmp_indirect_lock_t *)(l))->type]
  ------------------
 3246|  1.54k|  kmp_indirect_locktag_t tag = l->type;
 3247|       |
 3248|  1.54k|  __kmp_acquire_lock(&__kmp_global_lock, gtid);
 3249|       |
 3250|       |  // Use the base lock's space to keep the pool chain.
 3251|  1.54k|  l->lock->pool.next = (kmp_user_lock_p)__kmp_indirect_lock_pool[tag];
 3252|  1.54k|  if (OMP_LOCK_T_SIZE < sizeof(void *)) {
  ------------------
  |  |   54|  1.54k|#define OMP_LOCK_T_SIZE sizeof(int)
  ------------------
  |  Branch (3252:7): [True: 1.54k, Folded]
  ------------------
 3253|  1.54k|    l->lock->pool.index = KMP_EXTRACT_I_INDEX(lock);
  ------------------
  |  | 1145|  1.54k|#define KMP_EXTRACT_I_INDEX(l) (*(kmp_lock_index_t *)(l) >> 1)
  ------------------
 3254|  1.54k|  }
 3255|  1.54k|  __kmp_indirect_lock_pool[tag] = l;
 3256|       |
 3257|  1.54k|  __kmp_release_lock(&__kmp_global_lock, gtid);
 3258|  1.54k|}
kmp_lock.cpp:_ZL26__kmp_destroy_queuing_lockP13kmp_user_lock:
 2953|  1.54k|  static void __kmp_##op##_##lk##_##lock(kmp_user_lock_p lock) {               \
 2954|  1.54k|    __kmp_##op##_##lk##_##lock(&lock->lk);                                     \
 2955|  1.54k|  }

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|  3.08k|static inline int __kmp_acquire_lock(kmp_lock_t *lck, kmp_int32 gtid) {
  552|  3.08k|  return __kmp_acquire_ticket_lock(lck, gtid);
  553|  3.08k|}
kmp_lock.cpp:_ZL18__kmp_release_lockP15kmp_ticket_locki:
  559|  3.08k|static inline void __kmp_release_lock(kmp_lock_t *lck, kmp_int32 gtid) {
  560|  3.08k|  __kmp_release_ticket_lock(lck, gtid);
  561|  3.08k|}
kmp_lock.cpp:_ZL16__kmp_get_i_lockj:
 1240|  1.54k|static inline kmp_indirect_lock_t *__kmp_get_i_lock(kmp_lock_index_t idx) {
 1241|  1.54k|  kmp_indirect_lock_table_t *lock_table = &__kmp_i_lock_table;
 1242|  1.54k|  while (lock_table) {
  ------------------
  |  Branch (1242:10): [True: 1.54k, False: 0]
  ------------------
 1243|  1.54k|    kmp_lock_index_t max_locks = lock_table->nrow_ptrs * KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|  1.54k|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 1244|  1.54k|    if (idx < max_locks) {
  ------------------
  |  Branch (1244:9): [True: 1.54k, False: 0]
  ------------------
 1245|  1.54k|      kmp_lock_index_t row = idx / KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|  1.54k|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 1246|  1.54k|      kmp_lock_index_t col = idx % KMP_I_LOCK_CHUNK;
  ------------------
  |  | 1222|  1.54k|#define KMP_I_LOCK_CHUNK 1024
  ------------------
 1247|  1.54k|      if (!lock_table->table[row] || idx >= lock_table->next)
  ------------------
  |  Branch (1247:11): [True: 0, False: 1.54k]
  |  Branch (1247:38): [True: 0, False: 1.54k]
  ------------------
 1248|      0|        break;
 1249|  1.54k|      return &lock_table->table[row][col];
 1250|  1.54k|    }
 1251|      0|    idx -= max_locks;
 1252|      0|    lock_table = lock_table->next_table;
 1253|      0|  }
 1254|      0|  return nullptr;
 1255|  1.54k|}

__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|  6.16k|int __kmp_get_global_thread_id_reg() {
  228|  6.16k|  int gtid;
  229|       |
  230|  6.16k|  if (!__kmp_init_serial) {
  ------------------
  |  Branch (230:7): [True: 1, False: 6.15k]
  ------------------
  231|      1|    gtid = KMP_GTID_DNE;
  ------------------
  |  | 1000|      1|#define KMP_GTID_DNE (-2) /* Does not exist */
  ------------------
  232|      1|  } else
  233|  6.15k|#ifdef KMP_TDATA_GTID
  234|  6.15k|      if (TCR_4(__kmp_gtid_mode) >= 3) {
  ------------------
  |  | 1127|  6.15k|#define TCR_4(a) (a)
  ------------------
  |  Branch (234:11): [True: 6.15k, False: 0]
  ------------------
  235|  6.15k|    KA_TRACE(1000, ("*** __kmp_get_global_thread_id_reg: using TDATA\n"));
  236|  6.15k|    gtid = __kmp_gtid;
  237|  6.15k|  } 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|  6.16k|  if (gtid == KMP_GTID_DNE) {
  ------------------
  |  | 1000|  6.16k|#define KMP_GTID_DNE (-2) /* Does not exist */
  ------------------
  |  Branch (249:7): [True: 1, False: 6.15k]
  ------------------
  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|  6.16k|  KMP_DEBUG_ASSERT(gtid >= 0);
  265|       |
  266|  6.16k|  return gtid;
  267|  6.16k|}
__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|  3.08k|  OmptReturnAddressGuard(int Gtid, void *ReturnAddress) : Gtid(Gtid) {
  140|  3.08k|    if (ompt_enabled.enabled && Gtid >= 0 && __kmp_threads[Gtid] &&
  ------------------
  |  Branch (140:9): [True: 0, False: 3.08k]
  |  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|  3.08k|  }
_ZN22OmptReturnAddressGuardD2Ev:
  146|  3.08k|  ~OmptReturnAddressGuard() {
  147|  3.08k|    if (SetAddress)
  ------------------
  |  Branch (147:9): [True: 0, False: 3.08k]
  ------------------
  148|      0|      __kmp_threads[Gtid]->th.ompt_thread_info.return_address = NULL;
  149|  3.08k|  }
_Z26__ompt_load_return_addressi:
   79|  3.08k|inline void *__ompt_load_return_address(int gtid) {
   80|  3.08k|  kmp_info_t *thr = __kmp_threads[gtid];
   81|  3.08k|  void *return_address = thr->th.ompt_thread_info.return_address;
   82|       |  thr->th.ompt_thread_info.return_address = NULL;
   83|  3.08k|  return return_address;
   84|  3.08k|}
_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.93k|  while ((now = __kmp_hardware_timestamp()) < goal)
  ------------------
  |  Branch (2007:10): [True: 3.93k, False: 1]
  ------------------
 2008|  3.93k|    ;
 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

