; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/perf (perf)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.Perf::SessionSettings" = type { i64, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl" }
%"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl" = type { %"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.tbb::task_scheduler_init" = type { ptr }
%"struct.Perf::internal::TestResults" = type <{ ptr, i64, %"class.std::vector.14", %"class.std::vector.14", %"class.std::vector.19", %"class.std::vector.24", ptr, i8, [7 x i8] }>
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<Perf::internal::TimingSeries, std::allocator<Perf::internal::TimingSeries>>::_Vector_impl" }
%"struct.std::_Vector_base<Perf::internal::TimingSeries, std::allocator<Perf::internal::TimingSeries>>::_Vector_impl" = type { %"struct.std::_Vector_base<Perf::internal::TimingSeries, std::allocator<Perf::internal::TimingSeries>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Perf::internal::TimingSeries, std::allocator<Perf::internal::TimingSeries>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<Perf::internal::RunResults, std::allocator<Perf::internal::RunResults>>::_Vector_impl" }
%"struct.std::_Vector_base<Perf::internal::RunResults, std::allocator<Perf::internal::RunResults>>::_Vector_impl" = type { %"struct.std::_Vector_base<Perf::internal::RunResults, std::allocator<Perf::internal::RunResults>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Perf::internal::RunResults, std::allocator<Perf::internal::RunResults>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@NumCpus = external dso_local global i32, align 4
@NumThreads = external dso_local global i32, align 4
@MaxConcurrency = external dso_local global i32, align 4
@_ZN4Perf11theSettingsE = external dso_local global %"struct.Perf::SessionSettings", align 8
@_ZN4Perf8internal17NumActiveAffModesE = external dso_local global i32, align 4
@_ZN4Perf8internal10theSessionE = external dso_local global %"class.std::vector.0", align 8
@_ZL9MaxThread = external hidden global i32, align 4
@_ZL9MinThread = external hidden global i32, align 4
@_ZN4Perf8internalL14StatisticsModeE = external hidden global i8, align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness5SleepEi(i32 noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Perf8internal9WalkTestsEPFvRNS0_11TestResultsEiiiiiRiES3_bbb(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(4) %1, i1 noundef zeroext %2, i1 noundef zeroext %3, i1 noundef zeroext %4) #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.tbb::task_scheduler_init", align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  %25 = zext i1 %2 to i8
  store i8 %25, ptr %8, align 1, !tbaa !9
  %26 = zext i1 %3 to i8
  store i8 %26, ptr %9, align 1, !tbaa !9
  %27 = zext i1 %4 to i8
  store i8 %27, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %28 = load i32, ptr @_ZL9MinThread, align 4, !tbaa !11
  store i32 %28, ptr %11, align 4, !tbaa !11
  br label %29

29:                                               ; preds = %222, %5
  %30 = load i32, ptr %11, align 4, !tbaa !11
  %31 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !11
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %225

34:                                               ; preds = %29
  %35 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %35, ptr @NumThreads, align 4, !tbaa !11
  %36 = load i32, ptr %11, align 4, !tbaa !11
  %37 = load i32, ptr @NumCpus, align 4, !tbaa !11
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %39, label %41

39:                                               ; preds = %34
  %40 = load i32, ptr %11, align 4, !tbaa !11
  br label %43

41:                                               ; preds = %34
  %42 = load i32, ptr @NumCpus, align 4, !tbaa !11
  br label %43

43:                                               ; preds = %41, %39
  %44 = phi i32 [ %40, %39 ], [ %42, %41 ]
  store i32 %44, ptr @MaxConcurrency, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %45

45:                                               ; preds = %217, %43
  %46 = load i32, ptr %13, align 4, !tbaa !11
  %47 = load i32, ptr @_ZN4Perf8internal17NumActiveAffModesE, align 4, !tbaa !11
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %221

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  call void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef -2, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store ptr null, ptr %15, align 8, !tbaa !5
  %51 = load i64, ptr @_ZN4Perf11theSettingsE, align 8, !tbaa !13
  %52 = and i64 %51, 16
  %53 = icmp ne i64 %52, 0
  br i1 %53, label %54, label %95

54:                                               ; preds = %50
  %55 = load i8, ptr %10, align 1, !tbaa !9, !range !16, !noundef !17
  %56 = trunc i8 %55 to i1
  br i1 %56, label %60, label %57

57:                                               ; preds = %54
  %58 = load i8, ptr @_ZN4Perf8internalL14StatisticsModeE, align 1, !tbaa !9, !range !16, !noundef !17
  %59 = trunc i8 %58 to i1
  br i1 %59, label %95, label %60

60:                                               ; preds = %57, %54
  %61 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %62 = trunc i8 %61 to i1
  br i1 %62, label %66, label %63

63:                                               ; preds = %60
  %64 = load i8, ptr %9, align 1, !tbaa !9, !range !16, !noundef !17
  %65 = trunc i8 %64 to i1
  br i1 %65, label %66, label %95

66:                                               ; preds = %63, %60
  %67 = load i32, ptr %11, align 4, !tbaa !11
  invoke void @_ZN3tbb19task_scheduler_init10initializeEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %67)
          to label %68 unwind label %77

68:                                               ; preds = %66
  %69 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %70 = trunc i8 %69 to i1
  %71 = invoke noundef zeroext i1 @_ZN4Perf8internal10__TBB_boolEb(i1 noundef zeroext %70)
          to label %72 unwind label %77

72:                                               ; preds = %68
  br i1 %71, label %73, label %81

73:                                               ; preds = %72
  %74 = load i32, ptr %11, align 4, !tbaa !11
  %75 = load i32, ptr %13, align 4, !tbaa !11
  invoke void @_ZN4Perf8internal10AffinitizeEii(i32 noundef %74, i32 noundef %75)
          to label %76 unwind label %77

76:                                               ; preds = %73
  br label %81

77:                                               ; preds = %214, %213, %202, %86, %81, %73, %68, %66
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %16, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %17, align 4
  br label %220

81:                                               ; preds = %76, %72
  %82 = load i8, ptr %9, align 1, !tbaa !9, !range !16, !noundef !17
  %83 = trunc i8 %82 to i1
  %84 = invoke noundef zeroext i1 @_ZN4Perf8internal10__TBB_boolEb(i1 noundef zeroext %83)
          to label %85 unwind label %77

85:                                               ; preds = %81
  br i1 %84, label %86, label %94

86:                                               ; preds = %85
  %87 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 288) #9
          to label %88 unwind label %77

88:                                               ; preds = %86
  invoke void @_ZN4Perf8internal17TbbWorkersTrapperC2Ev(ptr noundef nonnull align 8 dereferenceable(288) %87)
          to label %89 unwind label %90

89:                                               ; preds = %88
  store ptr %87, ptr %15, align 8, !tbaa !5
  br label %94

90:                                               ; preds = %88
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %16, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %17, align 4
  call void @_ZdlPvm(ptr noundef %87, i64 noundef 288) #10
  br label %220

94:                                               ; preds = %89, %85
  br label %95

95:                                               ; preds = %94, %63, %57, %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 0, ptr %18, align 8, !tbaa !18
  br label %96

96:                                               ; preds = %193, %95
  %97 = load i64, ptr %18, align 8, !tbaa !18
  %98 = call noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE) #8
  %99 = icmp ult i64 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %198

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %102 = load i64, ptr %18, align 8, !tbaa !18
  %103 = call noundef nonnull align 8 dereferenceable(121) ptr @_ZNSt6vectorIN4Perf8internal11TestResultsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE, i64 noundef %102) #8
  store ptr %103, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %104 = load ptr, ptr %19, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.Perf::internal::TestResults", ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !19
  store ptr %106, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = load ptr, ptr %107, align 8, !tbaa !33
  %109 = getelementptr inbounds ptr, ptr %108, i64 7
  %110 = load ptr, ptr %109, align 8
  %111 = invoke noundef i32 %110(ptr noundef nonnull align 8 dereferenceable(8) %107)
          to label %112 unwind label %139

112:                                              ; preds = %101
  %113 = load ptr, ptr %20, align 8, !tbaa !5
  %114 = load ptr, ptr %113, align 8, !tbaa !33
  %115 = getelementptr inbounds ptr, ptr %114, i64 6
  %116 = load ptr, ptr %115, align 8
  %117 = invoke noundef i32 %116(ptr noundef nonnull align 8 dereferenceable(8) %113)
          to label %118 unwind label %139

118:                                              ; preds = %112
  %119 = sub nsw i32 %111, %117
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %121 = load i64, ptr @_ZN4Perf11theSettingsE, align 8, !tbaa !13
  %122 = and i64 %121, 64
  %123 = icmp ne i64 %122, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %118
  br label %132

125:                                              ; preds = %118
  %126 = load ptr, ptr %20, align 8, !tbaa !5
  %127 = load ptr, ptr %126, align 8, !tbaa !33
  %128 = getelementptr inbounds ptr, ptr %127, i64 2
  %129 = load ptr, ptr %128, align 8
  %130 = invoke noundef i32 %129(ptr noundef nonnull align 8 dereferenceable(8) %126)
          to label %131 unwind label %143

131:                                              ; preds = %125
  br label %132

132:                                              ; preds = %131, %124
  %133 = phi i32 [ 1, %124 ], [ %130, %131 ]
  store i32 %133, ptr %22, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %188, %132
  %135 = load i32, ptr %23, align 4, !tbaa !11
  %136 = load i32, ptr %22, align 4, !tbaa !11
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %147, label %138

138:                                              ; preds = %134
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %192

139:                                              ; preds = %112, %101
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %16, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %17, align 4
  br label %197

143:                                              ; preds = %125
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %16, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %17, align 4
  br label %196

147:                                              ; preds = %134
  %148 = load i8, ptr %10, align 1, !tbaa !9, !range !16, !noundef !17
  %149 = trunc i8 %148 to i1
  br i1 %149, label %150, label %174

150:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 1, ptr %24, align 4, !tbaa !11
  br label %151

151:                                              ; preds = %166, %150
  %152 = load i32, ptr %24, align 4, !tbaa !11
  %153 = load i32, ptr %21, align 4, !tbaa !11
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %173

156:                                              ; preds = %151
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  %159 = load i32, ptr %21, align 4, !tbaa !11
  %160 = load i32, ptr %23, align 4, !tbaa !11
  %161 = load i32, ptr %11, align 4, !tbaa !11
  %162 = load i32, ptr %24, align 4, !tbaa !11
  %163 = load i32, ptr %13, align 4, !tbaa !11
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void %157(ptr noundef nonnull align 8 dereferenceable(121) %158, i32 noundef %159, i32 noundef %160, i32 noundef %161, i32 noundef %162, i32 noundef %163, ptr noundef nonnull align 4 dereferenceable(4) %164)
          to label %165 unwind label %169

165:                                              ; preds = %156
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %24, align 4, !tbaa !11
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %24, align 4, !tbaa !11
  br label %151, !llvm.loop !35

169:                                              ; preds = %156
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %16, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %191

173:                                              ; preds = %155
  br label %187

174:                                              ; preds = %147
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = load ptr, ptr %19, align 8, !tbaa !5
  %177 = load i32, ptr %21, align 4, !tbaa !11
  %178 = load i32, ptr %23, align 4, !tbaa !11
  %179 = load i32, ptr %11, align 4, !tbaa !11
  %180 = load i32, ptr %13, align 4, !tbaa !11
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void %175(ptr noundef nonnull align 8 dereferenceable(121) %176, i32 noundef %177, i32 noundef %178, i32 noundef %179, i32 noundef 0, i32 noundef %180, ptr noundef nonnull align 4 dereferenceable(4) %181)
          to label %182 unwind label %183

182:                                              ; preds = %174
  br label %187

183:                                              ; preds = %174
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %16, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %17, align 4
  br label %191

187:                                              ; preds = %182, %173
  br label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %23, align 4, !tbaa !11
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %23, align 4, !tbaa !11
  br label %134, !llvm.loop !37

191:                                              ; preds = %183, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %196

192:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %193

193:                                              ; preds = %192
  %194 = load i64, ptr %18, align 8, !tbaa !18
  %195 = add i64 %194, 1
  store i64 %195, ptr %18, align 8, !tbaa !18
  br label %96, !llvm.loop !38

196:                                              ; preds = %191, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %197

197:                                              ; preds = %196, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %220

198:                                              ; preds = %100
  %199 = load i64, ptr @_ZN4Perf11theSettingsE, align 8, !tbaa !13
  %200 = and i64 %199, 16
  %201 = icmp ne i64 %200, 0
  br i1 %201, label %202, label %216

202:                                              ; preds = %198
  %203 = invoke noundef zeroext i1 @_ZNK3tbb19task_scheduler_init9is_activeEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %204 unwind label %77

204:                                              ; preds = %202
  br i1 %203, label %205, label %216

205:                                              ; preds = %204
  %206 = load ptr, ptr %15, align 8, !tbaa !5
  %207 = icmp ne ptr %206, null
  br i1 %207, label %208, label %213

208:                                              ; preds = %205
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = icmp eq ptr %209, null
  br i1 %210, label %212, label %211

211:                                              ; preds = %208
  call void @_ZN4Perf8internal17TbbWorkersTrapperD2Ev(ptr noundef nonnull align 8 dereferenceable(288) %209) #8
  call void @_ZdlPvm(ptr noundef %209, i64 noundef 288) #10
  br label %212

212:                                              ; preds = %211, %208
  br label %213

213:                                              ; preds = %212, %205
  invoke void @_ZN3tbb19task_scheduler_init9terminateEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %214 unwind label %77

214:                                              ; preds = %213
  invoke void @_ZN7Harness5SleepEi(i32 noundef 50)
          to label %215 unwind label %77

215:                                              ; preds = %214
  br label %216

216:                                              ; preds = %215, %204, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %13, align 4, !tbaa !11
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %13, align 4, !tbaa !11
  br label %45, !llvm.loop !39

220:                                              ; preds = %197, %90, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %226

221:                                              ; preds = %49
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %11, align 4, !tbaa !11
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %11, align 4, !tbaa !11
  br label %29, !llvm.loop !40

225:                                              ; preds = %33
  ret void

226:                                              ; preds = %220
  %227 = load ptr, ptr %16, align 8
  %228 = load i32, ptr %17, align 4
  %229 = insertvalue { ptr, i32 } poison, ptr %227, 0
  %230 = insertvalue { ptr, i32 } %229, i32 %228, 1
  resume { ptr, i32 } %230
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i64 noundef) unnamed_addr #1 align 2

declare void @_ZN3tbb19task_scheduler_init10initializeEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4Perf8internal10__TBB_boolEb(i1 noundef zeroext) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Perf8internal10AffinitizeEii(i32 noundef, i32 noundef) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Perf8internal17TbbWorkersTrapperC2Ev(ptr noundef nonnull align 8 dereferenceable(288)) unnamed_addr #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(121) ptr @_ZNSt6vectorIN4Perf8internal11TestResultsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3tbb19task_scheduler_init9is_activeEv(ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Perf8internal17TbbWorkersTrapperD2Ev(ptr noundef nonnull align 8 dereferenceable(288)) unnamed_addr #7 align 2

declare void @_ZN3tbb19task_scheduler_init9terminateEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN4Perf15SessionSettingsE", !15, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!15, !15, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSN4Perf8internal11TestResultsE", !6, i64 0, !15, i64 8, !21, i64 16, !21, i64 40, !25, i64 64, !29, i64 88, !6, i64 112, !10, i64 120}
!21 = !{!"_ZTSSt6vectorIN4Perf8internal12TimingSeriesESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN4Perf8internal12TimingSeriesESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal12TimingSeriesESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal12TimingSeriesESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorIN4Perf8internal10RunResultsESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIN4Perf8internal10RunResultsESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal10RunResultsESaIS2_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal10RunResultsESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !8, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = distinct !{!38, !36}
!39 = distinct !{!39, !36}
!40 = distinct !{!40, !36}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.Perf::SessionSettings" = type { i64, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl" }
%"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl" = type { %"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Perf::internal::TestResults, std::allocator<Perf::internal::TestResults>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.tbb::task_scheduler_init" = type { ptr }

@NumCpus = external dso_local local_unnamed_addr global i32, align 4
@NumThreads = external dso_local local_unnamed_addr global i32, align 4
@MaxConcurrency = external dso_local local_unnamed_addr global i32, align 4
@_ZN4Perf11theSettingsE = external dso_local local_unnamed_addr global %"struct.Perf::SessionSettings", align 8
@_ZN4Perf8internal17NumActiveAffModesE = external dso_local local_unnamed_addr global i32, align 4
@_ZN4Perf8internal10theSessionE = external dso_local global %"class.std::vector.0", align 8
@_ZL9MaxThread = external hidden local_unnamed_addr global i32, align 4
@_ZL9MinThread = external hidden local_unnamed_addr global i32, align 4
@_ZN4Perf8internalL14StatisticsModeE = external hidden local_unnamed_addr global i8, align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness5SleepEi(i32 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Perf8internal9WalkTestsEPFvRNS0_11TestResultsEiiiiiRiES3_bbb(ptr nocapture noundef readonly %0, ptr noundef nonnull align 4 dereferenceable(4) %1, i1 noundef zeroext %2, i1 noundef zeroext %3, i1 noundef zeroext %4) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.tbb::task_scheduler_init", align 8
  %7 = load i32, ptr @_ZL9MinThread, align 4, !tbaa !5
  %8 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !5
  %.not88 = icmp sgt i32 %7, %8
  br i1 %.not88, label %._crit_edge92, label %.lr.ph91

.lr.ph91:                                         ; preds = %5
  %brmerge = or i1 %2, %3
  %9 = load i32, ptr @_ZN4Perf8internal17NumActiveAffModesE, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph91.split, label %.lr.ph91.split.us

.lr.ph91.split.us:                                ; preds = %.lr.ph91
  %11 = load i32, ptr @NumCpus, align 4
  %smax = tail call i32 @llvm.smax.i32(i32 %7, i32 %8)
  %12 = tail call i32 @llvm.smin.i32(i32 %smax, i32 %11)
  store i32 %smax, ptr @NumThreads, align 4, !tbaa !5
  store i32 %12, ptr @MaxConcurrency, align 4, !tbaa !5
  br label %._crit_edge92

._crit_edge92:                                    ; preds = %._crit_edge, %.lr.ph91.split.us, %5
  ret void

.lr.ph91.split:                                   ; preds = %.lr.ph91, %._crit_edge
  %13 = phi i32 [ %18, %._crit_edge ], [ %8, %.lr.ph91 ]
  %14 = phi i32 [ %19, %._crit_edge ], [ %9, %.lr.ph91 ]
  %.04889 = phi i32 [ %20, %._crit_edge ], [ %7, %.lr.ph91 ]
  store i32 %.04889, ptr @NumThreads, align 4, !tbaa !5
  %15 = load i32, ptr @NumCpus, align 4
  %16 = call i32 @llvm.smin.i32(i32 %.04889, i32 %15)
  store i32 %16, ptr @MaxConcurrency, align 4, !tbaa !5
  %17 = icmp sgt i32 %14, 0
  br i1 %17, label %.lr.ph87, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %122
  %.pre = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph91.split
  %18 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %13, %.lr.ph91.split ]
  %19 = phi i32 [ %124, %._crit_edge.loopexit ], [ %14, %.lr.ph91.split ]
  %20 = add nsw i32 %.04889, 1
  %.not.not = icmp slt i32 %.04889, %18
  br i1 %.not.not, label %.lr.ph91.split, label %._crit_edge92, !llvm.loop !9

.lr.ph87:                                         ; preds = %.lr.ph91.split, %122
  %.04985 = phi i32 [ %123, %122 ], [ 0, %.lr.ph91.split ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef -2, i64 noundef 0)
  %21 = load i64, ptr @_ZN4Perf11theSettingsE, align 8, !tbaa !12
  %22 = and i64 %21, 16
  %.not58 = icmp eq i64 %22, 0
  br i1 %.not58, label %41, label %23

23:                                               ; preds = %.lr.ph87
  br i1 %4, label %27, label %24

24:                                               ; preds = %23
  %25 = load i8, ptr @_ZN4Perf8internalL14StatisticsModeE, align 1, !tbaa !16, !range !18, !noundef !19
  %26 = trunc nuw i8 %25 to i1
  %.not67 = xor i1 %26, true
  %or.cond = and i1 %brmerge, %.not67
  br i1 %or.cond, label %28, label %.thread

27:                                               ; preds = %23
  br i1 %brmerge, label %28, label %.thread106

28:                                               ; preds = %24, %27
  invoke void @_ZN3tbb19task_scheduler_init10initializeEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef %.04889)
          to label %29 unwind label %32

29:                                               ; preds = %28
  %30 = call noundef zeroext i1 @_ZN4Perf8internal10__TBB_boolEb(i1 noundef zeroext %2)
  br i1 %30, label %31, label %34

31:                                               ; preds = %29
  invoke void @_ZN4Perf8internal10AffinitizeEii(i32 noundef %.04889, i32 noundef %.04985)
          to label %34 unwind label %32

32:                                               ; preds = %121, %120, %36, %31, %28
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %126

34:                                               ; preds = %31, %29
  %35 = call noundef zeroext i1 @_ZN4Perf8internal10__TBB_boolEb(i1 noundef zeroext %3)
  br i1 %35, label %36, label %41

36:                                               ; preds = %34
  %37 = invoke noalias noundef nonnull dereferenceable(288) ptr @_Znwm(i64 noundef 288) #10
          to label %38 unwind label %32

38:                                               ; preds = %36
  invoke void @_ZN4Perf8internal17TbbWorkersTrapperC2Ev(ptr noundef nonnull align 8 dereferenceable(288) %37)
          to label %41 unwind label %39

39:                                               ; preds = %38
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %37, i64 noundef 288) #11
  br label %126

41:                                               ; preds = %38, %34, %.lr.ph87
  %.050 = phi ptr [ null, %34 ], [ null, %.lr.ph87 ], [ %37, %38 ]
  %42 = call noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE) #9
  %.not95 = icmp eq i64 %42, 0
  br i1 %.not95, label %._crit_edge75, label %.lr.ph

.thread106:                                       ; preds = %27
  %43 = call noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE) #9
  %.not95108 = icmp eq i64 %43, 0
  br i1 %.not95108, label %._crit_edge75, label %.lr.ph.split.us.preheader

.thread:                                          ; preds = %24
  %44 = call noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE) #9
  %.not95101 = icmp eq i64 %44, 0
  br i1 %.not95101, label %._crit_edge75, label %.lr.ph.split.preheader

.lr.ph:                                           ; preds = %41
  br i1 %4, label %.lr.ph.split.us.preheader, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.thread, %.lr.ph
  %.050102105 = phi ptr [ %.050, %.lr.ph ], [ null, %.thread ]
  br label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %.thread106, %.lr.ph
  %.050102111 = phi ptr [ %.050, %.lr.ph ], [ null, %.thread106 ]
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader, %._crit_edge.split.us.us
  %.05173.us = phi i64 [ %68, %._crit_edge.split.us.us ], [ 0, %.lr.ph.split.us.preheader ]
  %45 = call noundef nonnull align 8 dereferenceable(121) ptr @_ZNSt6vectorIN4Perf8internal11TestResultsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE, i64 noundef %.05173.us) #9
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = load ptr, ptr %46, align 8, !tbaa !34
  %48 = getelementptr inbounds i8, ptr %47, i64 56
  %49 = load ptr, ptr %48, align 8
  %50 = invoke noundef i32 %49(ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %51 unwind label %.split.us80

51:                                               ; preds = %.lr.ph.split.us
  %52 = load ptr, ptr %46, align 8, !tbaa !34
  %53 = getelementptr inbounds i8, ptr %52, i64 48
  %54 = load ptr, ptr %53, align 8
  %55 = invoke noundef i32 %54(ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %56 unwind label %.split.us80

56:                                               ; preds = %51
  %57 = sub nsw i32 %50, %55
  %58 = add nsw i32 %57, 1
  %59 = load i64, ptr @_ZN4Perf11theSettingsE, align 8, !tbaa !12
  %60 = and i64 %59, 64
  %.not61.us = icmp eq i64 %60, 0
  br i1 %.not61.us, label %61, label %.lr.ph72.us

61:                                               ; preds = %56
  %62 = load ptr, ptr %46, align 8, !tbaa !34
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %64 = load ptr, ptr %63, align 8
  %65 = invoke noundef i32 %64(ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %66 unwind label %.split82.us

66:                                               ; preds = %61
  %67 = icmp sgt i32 %65, 0
  br i1 %67, label %.lr.ph72.us, label %._crit_edge.split.us.us

._crit_edge.split.us.us:                          ; preds = %..loopexit_crit_edge.us.us, %.lr.ph72.us, %66
  %68 = add nuw i64 %.05173.us, 1
  %69 = call noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE) #9
  %70 = icmp ult i64 %68, %69
  br i1 %70, label %.lr.ph.split.us, label %._crit_edge75, !llvm.loop !36

.lr.ph72.us:                                      ; preds = %56, %66
  %71 = phi i32 [ %65, %66 ], [ 1, %56 ]
  %.not6268.us = icmp slt i32 %57, 1
  br i1 %.not6268.us, label %._crit_edge.split.us.us, label %.preheader.us.us76.preheader

.preheader.us.us76.preheader:                     ; preds = %.lr.ph72.us
  %72 = add i32 %50, 1
  %73 = sub i32 %72, %55
  br label %.preheader.us.us76

.preheader.us.us76:                               ; preds = %.preheader.us.us76.preheader, %..loopexit_crit_edge.us.us
  %.04770.us.us77 = phi i32 [ %77, %..loopexit_crit_edge.us.us ], [ 0, %.preheader.us.us76.preheader ]
  br label %74

74:                                               ; preds = %75, %.preheader.us.us76
  %.069.us.us = phi i32 [ 1, %.preheader.us.us76 ], [ %76, %75 ]
  invoke void %0(ptr noundef nonnull align 8 dereferenceable(121) %45, i32 noundef %58, i32 noundef %.04770.us.us77, i32 noundef %.04889, i32 noundef %.069.us.us, i32 noundef %.04985, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %75 unwind label %.split.us.split.us

75:                                               ; preds = %74
  %76 = add nuw i32 %.069.us.us, 1
  %exitcond98.not = icmp eq i32 %76, %73
  br i1 %exitcond98.not, label %..loopexit_crit_edge.us.us, label %74, !llvm.loop !37

..loopexit_crit_edge.us.us:                       ; preds = %75
  %77 = add nuw nsw i32 %.04770.us.us77, 1
  %exitcond99.not = icmp eq i32 %77, %71
  br i1 %exitcond99.not, label %._crit_edge.split.us.us, label %.preheader.us.us76, !llvm.loop !38

.split.us80:                                      ; preds = %51, %.lr.ph.split.us
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %126

.split82.us:                                      ; preds = %61
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %126

.split.us.split.us:                               ; preds = %74
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %126

._crit_edge75:                                    ; preds = %._crit_edge.split, %._crit_edge.split.us.us, %.thread106, %.thread, %41
  %.050103 = phi ptr [ null, %.thread ], [ %.050, %41 ], [ null, %.thread106 ], [ %.050102111, %._crit_edge.split.us.us ], [ %.050102105, %._crit_edge.split ]
  %81 = load i64, ptr @_ZN4Perf11theSettingsE, align 8, !tbaa !12
  %82 = and i64 %81, 16
  %.not59 = icmp eq i64 %82, 0
  br i1 %.not59, label %122, label %116

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %._crit_edge.split
  %.05173 = phi i64 [ %107, %._crit_edge.split ], [ 0, %.lr.ph.split.preheader ]
  %83 = call noundef nonnull align 8 dereferenceable(121) ptr @_ZNSt6vectorIN4Perf8internal11TestResultsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE, i64 noundef %.05173) #9
  %84 = load ptr, ptr %83, align 8, !tbaa !20
  %85 = load ptr, ptr %84, align 8, !tbaa !34
  %86 = getelementptr inbounds i8, ptr %85, i64 56
  %87 = load ptr, ptr %86, align 8
  %88 = invoke noundef i32 %87(ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %89 unwind label %.split

89:                                               ; preds = %.lr.ph.split
  %90 = load ptr, ptr %84, align 8, !tbaa !34
  %91 = getelementptr inbounds i8, ptr %90, i64 48
  %92 = load ptr, ptr %91, align 8
  %93 = invoke noundef i32 %92(ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %94 unwind label %.split

94:                                               ; preds = %89
  %95 = sub nsw i32 %88, %93
  %96 = add nsw i32 %95, 1
  %97 = load i64, ptr @_ZN4Perf11theSettingsE, align 8, !tbaa !12
  %98 = and i64 %97, 64
  %.not61 = icmp eq i64 %98, 0
  br i1 %.not61, label %99, label %.lr.ph72.preheader

99:                                               ; preds = %94
  %100 = load ptr, ptr %84, align 8, !tbaa !34
  %101 = getelementptr inbounds i8, ptr %100, i64 16
  %102 = load ptr, ptr %101, align 8
  %103 = invoke noundef i32 %102(ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %104 unwind label %.split82

104:                                              ; preds = %99
  %105 = icmp sgt i32 %103, 0
  br i1 %105, label %.lr.ph72.preheader, label %._crit_edge.split

.lr.ph72.preheader:                               ; preds = %94, %104
  %106 = phi i32 [ %103, %104 ], [ 1, %94 ]
  br label %.lr.ph72

._crit_edge.split:                                ; preds = %114, %104
  %107 = add nuw i64 %.05173, 1
  %108 = call noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN4Perf8internal10theSessionE) #9
  %109 = icmp ult i64 %107, %108
  br i1 %109, label %.lr.ph.split, label %._crit_edge75, !llvm.loop !36

.split:                                           ; preds = %89, %.lr.ph.split
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %126

.split82:                                         ; preds = %99
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %126

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %114
  %.04770 = phi i32 [ %115, %114 ], [ 0, %.lr.ph72.preheader ]
  invoke void %0(ptr noundef nonnull align 8 dereferenceable(121) %83, i32 noundef %96, i32 noundef %.04770, i32 noundef %.04889, i32 noundef 0, i32 noundef %.04985, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %114 unwind label %112

112:                                              ; preds = %.lr.ph72
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %126

114:                                              ; preds = %.lr.ph72
  %115 = add nuw nsw i32 %.04770, 1
  %exitcond.not = icmp eq i32 %115, %106
  br i1 %exitcond.not, label %._crit_edge.split, label %.lr.ph72, !llvm.loop !38

116:                                              ; preds = %._crit_edge75
  %117 = call noundef zeroext i1 @_ZNK3tbb19task_scheduler_init9is_activeEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %117, label %118, label %122

118:                                              ; preds = %116
  %.not60 = icmp eq ptr %.050103, null
  br i1 %.not60, label %120, label %119

119:                                              ; preds = %118
  call void @_ZN4Perf8internal17TbbWorkersTrapperD2Ev(ptr noundef nonnull align 8 dereferenceable(288) %.050103) #9
  call void @_ZdlPvm(ptr noundef nonnull %.050103, i64 noundef 288) #11
  br label %120

120:                                              ; preds = %119, %118
  invoke void @_ZN3tbb19task_scheduler_init9terminateEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %121 unwind label %32

121:                                              ; preds = %120
  invoke void @_ZN7Harness5SleepEi(i32 noundef 50)
          to label %122 unwind label %32

122:                                              ; preds = %121, %116, %._crit_edge75
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %123 = add nuw nsw i32 %.04985, 1
  %124 = load i32, ptr @_ZN4Perf8internal17NumActiveAffModesE, align 4, !tbaa !5
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %.lr.ph87, label %._crit_edge.loopexit, !llvm.loop !39

126:                                              ; preds = %.split82, %.split82.us, %.split, %.split.us80, %.split.us.split.us, %112, %39, %32
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %33, %32 ], [ %40, %39 ], [ %80, %.split.us.split.us ], [ %113, %112 ], [ %110, %.split ], [ %78, %.split.us80 ], [ %111, %.split82 ], [ %79, %.split82.us ]
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i64 noundef) unnamed_addr #1 align 2

declare void @_ZN3tbb19task_scheduler_init10initializeEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4Perf8internal10__TBB_boolEb(i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Perf8internal10AffinitizeEii(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Perf8internal17TbbWorkersTrapperC2Ev(ptr noundef nonnull align 8 dereferenceable(288)) unnamed_addr #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN4Perf8internal11TestResultsESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(121) ptr @_ZNSt6vectorIN4Perf8internal11TestResultsESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3tbb19task_scheduler_init9is_activeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Perf8internal17TbbWorkersTrapperD2Ev(ptr noundef nonnull align 8 dereferenceable(288)) unnamed_addr #7 align 2

declare void @_ZN3tbb19task_scheduler_init9terminateEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTSN4Perf15SessionSettingsE", !14, i64 0, !15, i64 8, !15, i64 16}
!14 = !{!"long", !7, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !15, i64 0}
!21 = !{!"_ZTSN4Perf8internal11TestResultsE", !15, i64 0, !14, i64 8, !22, i64 16, !22, i64 40, !26, i64 64, !30, i64 88, !15, i64 112, !17, i64 120}
!22 = !{!"_ZTSSt6vectorIN4Perf8internal12TimingSeriesESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN4Perf8internal12TimingSeriesESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal12TimingSeriesESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal12TimingSeriesESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!26 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!30 = !{!"_ZTSSt6vectorIN4Perf8internal10RunResultsESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN4Perf8internal10RunResultsESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal10RunResultsESaIS2_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN4Perf8internal10RunResultsESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!34 = !{!35, !35, i64 0}
!35 = !{!"vtable pointer", !8, i64 0}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10}
!38 = distinct !{!38, !10}
!39 = distinct !{!39, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass