; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/test/test_std_thread.ll (Z20CheckExceptionSafetyv)

; 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.tbb::atomic.0" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic.1" }
%"struct.tbb::internal::atomic_impl_with_arithmetic.1" = type { %"struct.tbb::internal::atomic_impl.2" }
%"struct.tbb::internal::atomic_impl.2" = type { %"struct.tbb::internal::aligned_storage.3" }
%"struct.tbb::internal::aligned_storage.3" = type { i32 }
%class.AnotherThreadFunc = type { %class.Base }
%class.Base = type { i32 }
%class.Data = type { %class.Base, i32 }
%class.Data.4 = type { %class.Base, i32 }
%"class.tbb::internal::tbb_thread_v3" = type { i64 }

@.str = external hidden unnamed_addr constant [85 x i8], align 1
@_ZL9BaseCount = external hidden global %"struct.tbb::atomic.0", align 4
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [21 x 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 @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20CheckExceptionSafetyv() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %class.AnotherThreadFunc, align 4
  %6 = alloca %class.Data, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.Data.4, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca %"class.tbb::internal::tbb_thread_v3", align 8
  %13 = alloca %class.AnotherThreadFunc, align 4
  %14 = alloca %"class.tbb::internal::tbb_thread_v3", align 8
  %15 = alloca %class.AnotherThreadFunc, align 4
  %16 = alloca %class.Data, align 4
  %17 = alloca %"class.tbb::internal::tbb_thread_v3", align 8
  %18 = alloca %class.AnotherThreadFunc, align 4
  %19 = alloca %class.Data, align 4
  %20 = alloca %class.Data.4, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  %21 = call noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @_ZL9BaseCount)
  store i32 %21, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %178, %0
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp sle i32 %23, 3
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %181

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %172, %26
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp slt i32 %28, 8
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %177

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.memset.p0.i64(ptr align 4 %5, i8 0, i64 4, i1 false)
  call void @_ZN17AnotherThreadFuncC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5)
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = and i32 %32, 1
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %38

35:                                               ; preds = %31
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = getelementptr inbounds %class.Base, ptr %5, i32 0, i32 0
  store i32 %36, ptr %37, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %35, %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  invoke void @_ZN4DataILi1EEC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef 0)
          to label %39 unwind label %46

39:                                               ; preds = %38
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = and i32 %40, 2
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %50

43:                                               ; preds = %39
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = getelementptr inbounds %class.Base, ptr %6, i32 0, i32 0
  store i32 %44, ptr %45, align 4, !tbaa !9
  br label %50

46:                                               ; preds = %38
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %7, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %8, align 4
  br label %176

50:                                               ; preds = %43, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  invoke void @_ZN4DataILi2EEC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %9, i32 noundef 0)
          to label %51 unwind label %58

51:                                               ; preds = %50
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = and i32 %52, 4
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %62

55:                                               ; preds = %51
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = getelementptr inbounds %class.Base, ptr %9, i32 0, i32 0
  store i32 %56, ptr %57, align 4, !tbaa !9
  br label %62

58:                                               ; preds = %50
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  br label %175

62:                                               ; preds = %55, %51
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 0, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %157, %62
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = icmp slt i32 %64, 3
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %165

67:                                               ; preds = %63
  %68 = load i32, ptr %11, align 4, !tbaa !5
  switch i32 %68, label %160 [
    i32 0, label %69
    i32 1, label %86
    i32 2, label %109
  ]

69:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  invoke void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %70 unwind label %73

70:                                               ; preds = %69
  invoke void @_ZN3tbb8internal13tbb_thread_v3C2I17AnotherThreadFuncEET_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %13)
          to label %71 unwind label %77

71:                                               ; preds = %70
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #6
  invoke void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %72 unwind label %81

72:                                               ; preds = %71
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %160

73:                                               ; preds = %69
  %74 = landingpad { ptr, i32 }
          catch ptr null
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %7, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %8, align 4
  br label %85

77:                                               ; preds = %70
  %78 = landingpad { ptr, i32 }
          catch ptr null
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %13) #6
  br label %85

81:                                               ; preds = %71
  %82 = landingpad { ptr, i32 }
          catch ptr null
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %85

85:                                               ; preds = %81, %77, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %138

86:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  invoke void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %87 unwind label %91

87:                                               ; preds = %86
  invoke void @_ZN4DataILi1EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %88 unwind label %95

88:                                               ; preds = %87
  invoke void @_ZN3tbb8internal13tbb_thread_v3C2I17AnotherThreadFunc4DataILi1EEEET_T0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %15, ptr noundef %16)
          to label %89 unwind label %99

89:                                               ; preds = %88
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %16) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %15) #6
  invoke void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %90 unwind label %104

90:                                               ; preds = %89
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %160

91:                                               ; preds = %86
  %92 = landingpad { ptr, i32 }
          catch ptr null
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %7, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %8, align 4
  br label %108

95:                                               ; preds = %87
  %96 = landingpad { ptr, i32 }
          catch ptr null
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %7, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %8, align 4
  br label %103

99:                                               ; preds = %88
  %100 = landingpad { ptr, i32 }
          catch ptr null
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %7, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %8, align 4
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %16) #6
  br label %103

103:                                              ; preds = %99, %95
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %15) #6
  br label %108

104:                                              ; preds = %89
  %105 = landingpad { ptr, i32 }
          catch ptr null
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %7, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %8, align 4
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %108

108:                                              ; preds = %104, %103, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %138

109:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  invoke void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %110 unwind label %115

110:                                              ; preds = %109
  invoke void @_ZN4DataILi1EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %111 unwind label %119

111:                                              ; preds = %110
  invoke void @_ZN4DataILi2EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %112 unwind label %123

112:                                              ; preds = %111
  invoke void @_ZN3tbb8internal13tbb_thread_v3C2I17AnotherThreadFunc4DataILi1EES4_ILi2EEEET_T0_T1_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %18, ptr noundef %19, ptr noundef %20)
          to label %113 unwind label %127

113:                                              ; preds = %112
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %20) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %19) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %18) #6
  invoke void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %114 unwind label %133

114:                                              ; preds = %113
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %160

115:                                              ; preds = %109
  %116 = landingpad { ptr, i32 }
          catch ptr null
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %7, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %8, align 4
  br label %137

119:                                              ; preds = %110
  %120 = landingpad { ptr, i32 }
          catch ptr null
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  br label %132

123:                                              ; preds = %111
  %124 = landingpad { ptr, i32 }
          catch ptr null
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %7, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %8, align 4
  br label %131

127:                                              ; preds = %112
  %128 = landingpad { ptr, i32 }
          catch ptr null
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %7, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %8, align 4
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %20) #6
  br label %131

131:                                              ; preds = %127, %123
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %19) #6
  br label %132

132:                                              ; preds = %131, %119
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %18) #6
  br label %137

133:                                              ; preds = %113
  %134 = landingpad { ptr, i32 }
          catch ptr null
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %7, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %8, align 4
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br label %137

137:                                              ; preds = %133, %132, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %138

138:                                              ; preds = %137, %108, %85
  %139 = load ptr, ptr %7, align 8
  %140 = call ptr @__cxa_begin_catch(ptr %139) #6
  store i8 1, ptr %10, align 1, !tbaa !11
  invoke void @__cxa_end_catch()
          to label %141 unwind label %161

141:                                              ; preds = %138
  br label %142

142:                                              ; preds = %160, %141
  %143 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %144 = trunc i8 %143 to i1
  br i1 %144, label %145, label %153

145:                                              ; preds = %142
  %146 = load i32, ptr %4, align 4, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  %149 = shl i32 1, %148
  %150 = sub nsw i32 %149, 1
  %151 = and i32 %146, %150
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %145, %142
  br label %156

154:                                              ; preds = %145
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 175, ptr noundef @.str.10, ptr noundef null)
          to label %155 unwind label %161

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155, %153
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %11, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %11, align 4, !tbaa !5
  br label %63, !llvm.loop !15

160:                                              ; preds = %114, %90, %72, %67
  br label %142

161:                                              ; preds = %154, %138
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %7, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %9) #6
  br label %175

165:                                              ; preds = %66
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %166 = call noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @_ZL9BaseCount)
  %167 = load i32, ptr %1, align 4, !tbaa !5
  %168 = icmp eq i32 %166, %167
  br i1 %168, label %169, label %170

169:                                              ; preds = %165
  br label %171

170:                                              ; preds = %165
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 178, ptr noundef @.str.11, ptr noundef @.str.12)
  br label %171

171:                                              ; preds = %170, %169
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %4, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %4, align 4, !tbaa !5
  br label %27, !llvm.loop !17

175:                                              ; preds = %161, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6) #6
  br label %176

176:                                              ; preds = %175, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %182

177:                                              ; preds = %30
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %2, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !18

181:                                              ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void

182:                                              ; preds = %176
  %183 = load ptr, ptr %7, align 8
  %184 = load i32, ptr %8, align 4
  %185 = insertvalue { ptr, i32 } poison, ptr %183, 0
  %186 = insertvalue { ptr, i32 } %185, i32 %184, 1
  resume { ptr, i32 } %186
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17AnotherThreadFuncC2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

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

declare void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4DataILi1EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4DataILi2EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #3 align 2

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #5 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { "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 = { 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 #6 = { 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 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4Base", !6, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; 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.tbb::atomic.0" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic.1" }
%"struct.tbb::internal::atomic_impl_with_arithmetic.1" = type { %"struct.tbb::internal::atomic_impl.2" }
%"struct.tbb::internal::atomic_impl.2" = type { %"struct.tbb::internal::aligned_storage.3" }
%"struct.tbb::internal::aligned_storage.3" = type { i32 }
%class.AnotherThreadFunc = type { %class.Base }
%class.Base = type { i32 }
%class.Data = type { %class.Base, i32 }
%class.Data.4 = type { %class.Base, i32 }
%"class.tbb::internal::tbb_thread_v3" = type { i64 }

@.str = external hidden unnamed_addr constant [85 x i8], align 1
@_ZL9BaseCount = external hidden global %"struct.tbb::atomic.0", align 4
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [21 x 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 @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20CheckExceptionSafetyv() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.AnotherThreadFunc, align 4
  %2 = alloca %class.Data, align 4
  %3 = alloca %class.Data.4, align 4
  %4 = alloca %"class.tbb::internal::tbb_thread_v3", align 8
  %5 = alloca %class.AnotherThreadFunc, align 4
  %6 = alloca %"class.tbb::internal::tbb_thread_v3", align 8
  %7 = alloca %class.AnotherThreadFunc, align 4
  %8 = alloca %class.Data, align 4
  %9 = alloca %"class.tbb::internal::tbb_thread_v3", align 8
  %10 = alloca %class.AnotherThreadFunc, align 4
  %11 = alloca %class.Data, align 4
  %12 = alloca %class.Data.4, align 4
  %13 = tail call noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @_ZL9BaseCount)
  br label %.preheader

.preheader:                                       ; preds = %0, %15
  %.02542 = phi i32 [ 1, %0 ], [ %16, %15 ]
  br label %17

14:                                               ; preds = %15
  ret void

15:                                               ; preds = %92
  %16 = add nuw nsw i32 %.02542, 1
  %exitcond44.not = icmp eq i32 %16, 4
  br i1 %exitcond44.not, label %14, label %.preheader, !llvm.loop !5

17:                                               ; preds = %.preheader, %92
  %.02441 = phi i32 [ 0, %.preheader ], [ %93, %92 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 0, ptr %1, align 4
  call void @_ZN17AnotherThreadFuncC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %1)
  %18 = and i32 %.02441, 1
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %20, label %19

19:                                               ; preds = %17
  store i32 %.02542, ptr %1, align 4, !tbaa !7
  br label %20

20:                                               ; preds = %19, %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  invoke void @_ZN4DataILi1EEC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %2, i32 noundef 0)
          to label %21 unwind label %24

21:                                               ; preds = %20
  %22 = and i32 %.02441, 2
  %.not26 = icmp eq i32 %22, 0
  br i1 %.not26, label %26, label %23

23:                                               ; preds = %21
  store i32 %.02542, ptr %2, align 4, !tbaa !7
  br label %26

24:                                               ; preds = %20
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %95

26:                                               ; preds = %23, %21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  invoke void @_ZN4DataILi2EEC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef 0)
          to label %27 unwind label %29

27:                                               ; preds = %26
  %.not27 = icmp ult i32 %.02441, 4
  br i1 %.not27, label %.preheader45, label %28

.preheader45:                                     ; preds = %28, %27
  br label %34

28:                                               ; preds = %27
  store i32 %.02542, ptr %3, align 4, !tbaa !7
  br label %.preheader45

29:                                               ; preds = %26
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %94

31:                                               ; preds = %87
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %1) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %32 = call noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @_ZL9BaseCount)
  %33 = icmp eq i32 %32, %13
  br i1 %33, label %92, label %91

34:                                               ; preds = %.preheader45, %87
  %.040 = phi i32 [ %88, %87 ], [ 0, %.preheader45 ]
  %.01939 = phi i1 [ %.137, %87 ], [ false, %.preheader45 ]
  switch i32 %.040, label %default.unreachable [
    i32 0, label %35
    i32 1, label %46
    i32 2, label %61
  ]

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  invoke void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %36 unwind label %39

36:                                               ; preds = %35
  invoke void @_ZN3tbb8internal13tbb_thread_v3C2I17AnotherThreadFuncEET_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %5)
          to label %37 unwind label %41

37:                                               ; preds = %36
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  invoke void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %38 unwind label %43

38:                                               ; preds = %37
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %82

39:                                               ; preds = %35
  %40 = landingpad { ptr, i32 }
          catch ptr null
  br label %45

41:                                               ; preds = %36
  %42 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  br label %45

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %45

45:                                               ; preds = %43, %41, %39
  %.pn31 = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %80

46:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  invoke void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %47 unwind label %51

47:                                               ; preds = %46
  invoke void @_ZN4DataILi1EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %2)
          to label %48 unwind label %53

48:                                               ; preds = %47
  invoke void @_ZN3tbb8internal13tbb_thread_v3C2I17AnotherThreadFunc4DataILi1EEEET_T0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
          to label %49 unwind label %55

49:                                               ; preds = %48
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %8) #5
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %7) #5
  invoke void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %50 unwind label %58

50:                                               ; preds = %49
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %82

51:                                               ; preds = %46
  %52 = landingpad { ptr, i32 }
          catch ptr null
  br label %60

53:                                               ; preds = %47
  %54 = landingpad { ptr, i32 }
          catch ptr null
  br label %57

55:                                               ; preds = %48
  %56 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %8) #5
  br label %57

57:                                               ; preds = %55, %53
  %.pn29 = phi { ptr, i32 } [ %56, %55 ], [ %54, %53 ]
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %7) #5
  br label %60

58:                                               ; preds = %49
  %59 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %60

60:                                               ; preds = %58, %57, %51
  %.pn30 = phi { ptr, i32 } [ %59, %58 ], [ %.pn29, %57 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %80

61:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  invoke void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %62 unwind label %67

62:                                               ; preds = %61
  invoke void @_ZN4DataILi1EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %2)
          to label %63 unwind label %69

63:                                               ; preds = %62
  invoke void @_ZN4DataILi2EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %64 unwind label %71

64:                                               ; preds = %63
  invoke void @_ZN3tbb8internal13tbb_thread_v3C2I17AnotherThreadFunc4DataILi1EES4_ILi2EEEET_T0_T1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
          to label %65 unwind label %73

65:                                               ; preds = %64
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %12) #5
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %11) #5
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %10) #5
  invoke void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %66 unwind label %77

66:                                               ; preds = %65
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %82

67:                                               ; preds = %61
  %68 = landingpad { ptr, i32 }
          catch ptr null
  br label %79

69:                                               ; preds = %62
  %70 = landingpad { ptr, i32 }
          catch ptr null
  br label %76

71:                                               ; preds = %63
  %72 = landingpad { ptr, i32 }
          catch ptr null
  br label %75

73:                                               ; preds = %64
  %74 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %12) #5
  br label %75

75:                                               ; preds = %73, %71
  %.pn = phi { ptr, i32 } [ %74, %73 ], [ %72, %71 ]
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %11) #5
  br label %76

76:                                               ; preds = %75, %69
  %.pn.pn = phi { ptr, i32 } [ %.pn, %75 ], [ %70, %69 ]
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %10) #5
  br label %79

77:                                               ; preds = %65
  %78 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZN3tbb8internal13tbb_thread_v3D2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %79

79:                                               ; preds = %77, %76, %67
  %.pn28 = phi { ptr, i32 } [ %78, %77 ], [ %.pn.pn, %76 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %80

80:                                               ; preds = %79, %60, %45
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %79 ], [ %.pn30, %60 ], [ %.pn31, %45 ]
  %.6 = extractvalue { ptr, i32 } %.pn28.pn, 0
  %81 = call ptr @__cxa_begin_catch(ptr %.6) #5
  invoke void @__cxa_end_catch()
          to label %.thread unwind label %89

default.unreachable:                              ; preds = %34
  unreachable

82:                                               ; preds = %38, %50, %66
  br i1 %.01939, label %.thread, label %87

.thread:                                          ; preds = %80, %82
  %83 = shl nuw nsw i32 2, %.040
  %84 = add nuw i32 %83, 2147483647
  %85 = and i32 %84, %.02441
  %.not32 = icmp eq i32 %85, 0
  br i1 %.not32, label %86, label %87

86:                                               ; preds = %.thread
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 175, ptr noundef nonnull @.str.10, ptr noundef null)
          to label %87 unwind label %89

87:                                               ; preds = %.thread, %82, %86
  %.137 = phi i1 [ true, %.thread ], [ false, %82 ], [ true, %86 ]
  %88 = add nuw nsw i32 %.040, 1
  %exitcond.not = icmp eq i32 %88, 3
  br i1 %exitcond.not, label %31, label %34, !llvm.loop !12

89:                                               ; preds = %86, %80
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #5
  br label %94

91:                                               ; preds = %31
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 178, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12)
  br label %92

92:                                               ; preds = %91, %31
  %93 = add nuw nsw i32 %.02441, 1
  %exitcond43.not = icmp eq i32 %93, 8
  br i1 %exitcond43.not, label %15, label %17, !llvm.loop !13

94:                                               ; preds = %89, %29
  %.pn33 = phi { ptr, i32 } [ %90, %89 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2) #5
  br label %95

95:                                               ; preds = %94, %24
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %94 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @_ZN4BaseD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %1) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn33.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17AnotherThreadFuncC2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17AnotherThreadFuncC2ERKS_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

declare void @_ZN3tbb8internal13tbb_thread_v34joinEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4DataILi1EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4DataILi2EEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #2 align 2

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

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

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 = { 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 #3 = { "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 = { 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 #5 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 0}
!8 = !{!"_ZTS4Base", !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass