; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/tbb/tools_api/ittnotify_static.ll_ (itt_init_ittlib)

; 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.___itt_global = type { [8 x i8], i64, i64, i64, i64, i64, i64, %union.pthread_mutex_t, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_mutexattr_t = type { i32 }
%struct.___itt_api_info = type { ptr, ptr, ptr, ptr, i32 }

@__itt_sync_create_ptr__3_0 = external dso_local global ptr, align 8
@__itt_sync_prepare_ptr__3_0 = external dso_local global ptr, align 8
@__itt_sync_cancel_ptr__3_0 = external dso_local global ptr, align 8
@__itt_sync_acquired_ptr__3_0 = external dso_local global ptr, align 8
@__itt_sync_releasing_ptr__3_0 = external dso_local global ptr, align 8
@__itt_sync_set_name_ptr__3_0 = external dso_local global ptr, align 8
@__itt_notify_sync_prepare_ptr__3_0 = external dso_local global ptr, align 8
@__itt_notify_sync_cancel_ptr__3_0 = external dso_local global ptr, align 8
@__itt_notify_sync_acquired_ptr__3_0 = external dso_local global ptr, align 8
@__itt_notify_sync_releasing_ptr__3_0 = external dso_local global ptr, align 8
@__itt_thread_ignore_ptr__3_0 = external dso_local global ptr, align 8
@__itt_thr_ignore_ptr__3_0 = external dso_local global ptr, align 8
@__itt__ittapi_global = external dso_local global %struct.___itt_global, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@__itt_init_ittlib.current_thread = external hidden global i64, align 8
@ittnotify_lib_name = external hidden global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@__itt_fini_ittlib_ptr = external hidden global ptr, align 8

; Function Attrs: nounwind uwtable
declare dso_local void @__itt_fini_ittlib() #0

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

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_init(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_lock(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_unlock(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_destroy(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutexattr_init(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutexattr_settype(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutexattr_destroy(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare extern_weak i64 @pthread_self() #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @__itt_interlocked_increment(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @__itt_report_error_impl(i32 noundef, ...) #0

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

; Function Attrs: nounwind
declare i32 @sched_yield() #2

; Function Attrs: nounwind
declare extern_weak ptr @dlsym(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @__itt_nullify_all_pointers() #0

; Function Attrs: nounwind uwtable
define dso_local i32 @__itt_init_ittlib(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %union.pthread_mutexattr_t, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %14 = load volatile i64, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 4), align 8, !tbaa !11
  %15 = icmp ne i64 %14, 0
  br i1 %15, label %269, label %16

16:                                               ; preds = %2
  %17 = icmp ne ptr @pthread_mutex_init, null
  br i1 %17, label %18, label %74

18:                                               ; preds = %16
  %19 = icmp ne ptr @pthread_mutex_lock, null
  br i1 %19, label %20, label %74

20:                                               ; preds = %18
  %21 = icmp ne ptr @pthread_mutex_unlock, null
  br i1 %21, label %22, label %74

22:                                               ; preds = %20
  %23 = icmp ne ptr @pthread_mutex_destroy, null
  br i1 %23, label %24, label %74

24:                                               ; preds = %22
  %25 = icmp ne ptr @pthread_mutexattr_init, null
  br i1 %25, label %26, label %74

26:                                               ; preds = %24
  %27 = icmp ne ptr @pthread_mutexattr_settype, null
  br i1 %27, label %28, label %74

28:                                               ; preds = %26
  %29 = icmp ne ptr @pthread_mutexattr_destroy, null
  br i1 %29, label %30, label %74

30:                                               ; preds = %28
  %31 = icmp ne ptr @pthread_self, null
  br i1 %31, label %32, label %74

32:                                               ; preds = %30
  %33 = load volatile i64, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 5), align 8, !tbaa !14
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %72, label %35

35:                                               ; preds = %32
  %36 = call i64 @__itt_interlocked_increment(ptr noundef getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 6))
  %37 = icmp eq i64 %36, 1
  br i1 %37, label %38, label %63

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %39 = call i32 @pthread_mutexattr_init(ptr noundef %8) #5
  store i32 %39, ptr %9, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %44

42:                                               ; preds = %38
  %43 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef @.str, i32 noundef %43)
  br label %44

44:                                               ; preds = %42, %38
  %45 = call i32 @pthread_mutexattr_settype(ptr noundef %8, i32 noundef 1) #5
  store i32 %45, ptr %9, align 4, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %50

48:                                               ; preds = %44
  %49 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef @.str.1, i32 noundef %49)
  br label %50

50:                                               ; preds = %48, %44
  %51 = call i32 @pthread_mutex_init(ptr noundef getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 7), ptr noundef %8) #5
  store i32 %51, ptr %9, align 4, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %50
  %55 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef @.str.2, i32 noundef %55)
  br label %56

56:                                               ; preds = %54, %50
  %57 = call i32 @pthread_mutexattr_destroy(ptr noundef %8) #5
  store i32 %57, ptr %9, align 4, !tbaa !9
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %56
  %61 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef @.str.3, i32 noundef %61)
  br label %62

62:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  store volatile i64 1, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 5), align 8, !tbaa !14
  br label %71

63:                                               ; preds = %35
  br label %64

64:                                               ; preds = %68, %63
  %65 = load volatile i64, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 5), align 8, !tbaa !14
  %66 = icmp ne i64 %65, 0
  %67 = xor i1 %66, true
  br i1 %67, label %68, label %70

68:                                               ; preds = %64
  %69 = call i32 @sched_yield() #5
  br label %64, !llvm.loop !15

70:                                               ; preds = %64
  br label %71

71:                                               ; preds = %70, %62
  br label %72

72:                                               ; preds = %71, %32
  %73 = call i32 @pthread_mutex_lock(ptr noundef getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 7)) #5
  br label %74

74:                                               ; preds = %72, %30, %28, %26, %24, %22, %20, %18, %16
  %75 = load volatile i64, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 4), align 8, !tbaa !11
  %76 = icmp ne i64 %75, 0
  br i1 %76, label %250, label %77

77:                                               ; preds = %74
  %78 = load volatile i64, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !17
  %79 = icmp eq i64 %78, 0
  br i1 %79, label %80, label %249

80:                                               ; preds = %77
  %81 = icmp ne ptr @pthread_mutex_init, null
  br i1 %81, label %82, label %98

82:                                               ; preds = %80
  %83 = icmp ne ptr @pthread_mutex_lock, null
  br i1 %83, label %84, label %98

84:                                               ; preds = %82
  %85 = icmp ne ptr @pthread_mutex_unlock, null
  br i1 %85, label %86, label %98

86:                                               ; preds = %84
  %87 = icmp ne ptr @pthread_mutex_destroy, null
  br i1 %87, label %88, label %98

88:                                               ; preds = %86
  %89 = icmp ne ptr @pthread_mutexattr_init, null
  br i1 %89, label %90, label %98

90:                                               ; preds = %88
  %91 = icmp ne ptr @pthread_mutexattr_settype, null
  br i1 %91, label %92, label %98

92:                                               ; preds = %90
  %93 = icmp ne ptr @pthread_mutexattr_destroy, null
  br i1 %93, label %94, label %98

94:                                               ; preds = %92
  %95 = icmp ne ptr @pthread_self, null
  br i1 %95, label %96, label %98

96:                                               ; preds = %94
  %97 = call i64 @pthread_self() #6
  store volatile i64 %97, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !17
  br label %98

98:                                               ; preds = %96, %94, %92, %90, %88, %86, %84, %82, %80
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %103

101:                                              ; preds = %98
  %102 = call ptr @__itt_get_lib_name()
  store ptr %102, ptr %4, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %101, %98
  %104 = call i32 @__itt_get_groups()
  store i32 %104, ptr %7, align 4, !tbaa !9
  %105 = icmp ne ptr @dlopen, null
  br i1 %105, label %106, label %243

106:                                              ; preds = %103
  %107 = icmp ne ptr @dlsym, null
  br i1 %107, label %108, label %243

108:                                              ; preds = %106
  %109 = icmp ne ptr @dlclose, null
  br i1 %109, label %110, label %243

110:                                              ; preds = %108
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %116, label %113

113:                                              ; preds = %110
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %243

116:                                              ; preds = %113, %110
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = icmp eq ptr %117, null
  br i1 %118, label %119, label %121

119:                                              ; preds = %116
  %120 = load ptr, ptr @ittnotify_lib_name, align 8, !tbaa !5
  br label %123

121:                                              ; preds = %116
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %121, %119
  %124 = phi ptr [ %120, %119 ], [ %122, %121 ]
  %125 = call ptr @dlopen(ptr noundef %124, i32 noundef 1) #5
  store ptr %125, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 8), align 8, !tbaa !18
  %126 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 8), align 8, !tbaa !18
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %238

128:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %129 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 8), align 8, !tbaa !18
  %130 = call i32 @__itt_lib_version(ptr noundef %129)
  store i32 %130, ptr %11, align 4, !tbaa !9
  %131 = load i32, ptr %11, align 4, !tbaa !9
  switch i32 %131, label %237 [
    i32 0, label %132
    i32 1, label %133
    i32 2, label %226
  ]

132:                                              ; preds = %128
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %132, %128
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %212, %133
  %135 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %136 = load i32, ptr %6, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.___itt_api_info, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.___itt_api_info, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !20
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %215

142:                                              ; preds = %134
  %143 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %144 = load i32, ptr %6, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds %struct.___itt_api_info, ptr %143, i64 %145
  %147 = getelementptr inbounds %struct.___itt_api_info, ptr %146, i32 0, i32 4
  %148 = load i32, ptr %147, align 8, !tbaa !22
  %149 = load i32, ptr %7, align 4, !tbaa !9
  %150 = and i32 %148, %149
  %151 = load i32, ptr %5, align 4, !tbaa !9
  %152 = and i32 %150, %151
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %198

154:                                              ; preds = %142
  %155 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 8), align 8, !tbaa !18
  %156 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %157 = load i32, ptr %6, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds %struct.___itt_api_info, ptr %156, i64 %158
  %160 = getelementptr inbounds %struct.___itt_api_info, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !20
  %162 = call ptr @dlsym(ptr noundef %155, ptr noundef %161) #5
  %163 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %164 = load i32, ptr %6, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds %struct.___itt_api_info, ptr %163, i64 %165
  %167 = getelementptr inbounds %struct.___itt_api_info, ptr %166, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !23
  store ptr %162, ptr %168, align 8, !tbaa !5
  %169 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %170 = load i32, ptr %6, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %struct.___itt_api_info, ptr %169, i64 %171
  %173 = getelementptr inbounds %struct.___itt_api_info, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !23
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  %176 = icmp eq ptr %175, null
  br i1 %176, label %177, label %197

177:                                              ; preds = %154
  %178 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %179 = load i32, ptr %6, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds %struct.___itt_api_info, ptr %178, i64 %180
  %182 = getelementptr inbounds %struct.___itt_api_info, ptr %181, i32 0, i32 3
  %183 = load ptr, ptr %182, align 8, !tbaa !24
  %184 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %185 = load i32, ptr %6, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds %struct.___itt_api_info, ptr %184, i64 %186
  %188 = getelementptr inbounds %struct.___itt_api_info, ptr %187, i32 0, i32 1
  %189 = load ptr, ptr %188, align 8, !tbaa !23
  store ptr %183, ptr %189, align 8, !tbaa !5
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %192 = load i32, ptr %6, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds %struct.___itt_api_info, ptr %191, i64 %193
  %195 = getelementptr inbounds %struct.___itt_api_info, ptr %194, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8, !tbaa !20
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 2, ptr noundef %190, ptr noundef %196)
  br label %197

197:                                              ; preds = %177, %154
  br label %211

198:                                              ; preds = %142
  %199 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %200 = load i32, ptr %6, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds %struct.___itt_api_info, ptr %199, i64 %201
  %203 = getelementptr inbounds %struct.___itt_api_info, ptr %202, i32 0, i32 3
  %204 = load ptr, ptr %203, align 8, !tbaa !24
  %205 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds %struct.___itt_api_info, ptr %205, i64 %207
  %209 = getelementptr inbounds %struct.___itt_api_info, ptr %208, i32 0, i32 1
  %210 = load ptr, ptr %209, align 8, !tbaa !23
  store ptr %204, ptr %210, align 8, !tbaa !5
  br label %211

211:                                              ; preds = %198, %197
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %6, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %6, align 4, !tbaa !9
  br label %134, !llvm.loop !25

215:                                              ; preds = %134
  %216 = load i32, ptr %7, align 4, !tbaa !9
  %217 = icmp eq i32 %216, 1
  br i1 %217, label %218, label %225

218:                                              ; preds = %215
  %219 = load ptr, ptr @__itt_thr_ignore_ptr__3_0, align 8, !tbaa !5
  store ptr %219, ptr @__itt_thread_ignore_ptr__3_0, align 8, !tbaa !5
  %220 = load ptr, ptr @__itt_sync_set_name_ptr__3_0, align 8, !tbaa !5
  store ptr %220, ptr @__itt_sync_create_ptr__3_0, align 8, !tbaa !5
  %221 = load ptr, ptr @__itt_notify_sync_prepare_ptr__3_0, align 8, !tbaa !5
  store ptr %221, ptr @__itt_sync_prepare_ptr__3_0, align 8, !tbaa !5
  %222 = load ptr, ptr @__itt_notify_sync_cancel_ptr__3_0, align 8, !tbaa !5
  store ptr %222, ptr @__itt_sync_cancel_ptr__3_0, align 8, !tbaa !5
  %223 = load ptr, ptr @__itt_notify_sync_acquired_ptr__3_0, align 8, !tbaa !5
  store ptr %223, ptr @__itt_sync_acquired_ptr__3_0, align 8, !tbaa !5
  %224 = load ptr, ptr @__itt_notify_sync_releasing_ptr__3_0, align 8, !tbaa !5
  store ptr %224, ptr @__itt_sync_releasing_ptr__3_0, align 8, !tbaa !5
  br label %225

225:                                              ; preds = %218, %215
  br label %237

226:                                              ; preds = %128
  %227 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 8), align 8, !tbaa !18
  %228 = call ptr @dlsym(ptr noundef %227, ptr noundef @.str.5) #5
  %229 = ptrtoint ptr %228 to i64
  %230 = inttoptr i64 %229 to ptr
  store ptr %230, ptr %10, align 8, !tbaa !5
  %231 = load ptr, ptr %10, align 8, !tbaa !5
  %232 = icmp ne ptr %231, null
  br i1 %232, label %233, label %236

233:                                              ; preds = %226
  %234 = load ptr, ptr %10, align 8, !tbaa !5
  %235 = load i32, ptr %5, align 4, !tbaa !9
  call void %234(ptr noundef @__itt__ittapi_global, i32 noundef %235)
  br label %236

236:                                              ; preds = %233, %226
  br label %237

237:                                              ; preds = %236, %225, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %242

238:                                              ; preds = %123
  call void @__itt_nullify_all_pointers()
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %239 = call ptr @dlerror() #5
  store ptr %239, ptr %12, align 8, !tbaa !5
  %240 = load ptr, ptr %4, align 8, !tbaa !5
  %241 = load ptr, ptr %12, align 8, !tbaa !5
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 1, ptr noundef %240, ptr noundef %241)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %242

242:                                              ; preds = %238, %237
  br label %244

243:                                              ; preds = %113, %108, %106, %103
  call void @__itt_nullify_all_pointers()
  br label %244

244:                                              ; preds = %243, %242
  store volatile i64 1, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 4), align 8, !tbaa !11
  store volatile i64 0, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !17
  %245 = load ptr, ptr @__itt_fini_ittlib_ptr, align 8, !tbaa !5
  %246 = icmp eq ptr %245, @__itt_fini_ittlib
  br i1 %246, label %247, label %248

247:                                              ; preds = %244
  store volatile i64 0, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !17
  br label %248

248:                                              ; preds = %247, %244
  br label %249

249:                                              ; preds = %248, %77
  br label %250

250:                                              ; preds = %249, %74
  %251 = icmp ne ptr @pthread_mutex_init, null
  br i1 %251, label %252, label %268

252:                                              ; preds = %250
  %253 = icmp ne ptr @pthread_mutex_lock, null
  br i1 %253, label %254, label %268

254:                                              ; preds = %252
  %255 = icmp ne ptr @pthread_mutex_unlock, null
  br i1 %255, label %256, label %268

256:                                              ; preds = %254
  %257 = icmp ne ptr @pthread_mutex_destroy, null
  br i1 %257, label %258, label %268

258:                                              ; preds = %256
  %259 = icmp ne ptr @pthread_mutexattr_init, null
  br i1 %259, label %260, label %268

260:                                              ; preds = %258
  %261 = icmp ne ptr @pthread_mutexattr_settype, null
  br i1 %261, label %262, label %268

262:                                              ; preds = %260
  %263 = icmp ne ptr @pthread_mutexattr_destroy, null
  br i1 %263, label %264, label %268

264:                                              ; preds = %262
  %265 = icmp ne ptr @pthread_self, null
  br i1 %265, label %266, label %268

266:                                              ; preds = %264
  %267 = call i32 @pthread_mutex_unlock(ptr noundef getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 7)) #5
  br label %268

268:                                              ; preds = %266, %264, %262, %260, %258, %256, %254, %252, %250
  br label %269

269:                                              ; preds = %268, %2
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %270

270:                                              ; preds = %305, %269
  %271 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %272 = load i32, ptr %6, align 4, !tbaa !9
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds %struct.___itt_api_info, ptr %271, i64 %273
  %275 = getelementptr inbounds %struct.___itt_api_info, ptr %274, i32 0, i32 0
  %276 = load ptr, ptr %275, align 8, !tbaa !20
  %277 = icmp ne ptr %276, null
  br i1 %277, label %278, label %308

278:                                              ; preds = %270
  %279 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %280 = load i32, ptr %6, align 4, !tbaa !9
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds %struct.___itt_api_info, ptr %279, i64 %281
  %283 = getelementptr inbounds %struct.___itt_api_info, ptr %282, i32 0, i32 1
  %284 = load ptr, ptr %283, align 8, !tbaa !23
  %285 = load ptr, ptr %284, align 8, !tbaa !5
  %286 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %287 = load i32, ptr %6, align 4, !tbaa !9
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds %struct.___itt_api_info, ptr %286, i64 %288
  %290 = getelementptr inbounds %struct.___itt_api_info, ptr %289, i32 0, i32 3
  %291 = load ptr, ptr %290, align 8, !tbaa !24
  %292 = icmp ne ptr %285, %291
  br i1 %292, label %293, label %304

293:                                              ; preds = %278
  %294 = load ptr, ptr getelementptr inbounds (%struct.___itt_global, ptr @__itt__ittapi_global, i32 0, i32 11), align 8, !tbaa !19
  %295 = load i32, ptr %6, align 4, !tbaa !9
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds %struct.___itt_api_info, ptr %294, i64 %296
  %298 = getelementptr inbounds %struct.___itt_api_info, ptr %297, i32 0, i32 4
  %299 = load i32, ptr %298, align 8, !tbaa !22
  %300 = load i32, ptr %5, align 4, !tbaa !9
  %301 = and i32 %299, %300
  %302 = icmp ne i32 %301, 0
  br i1 %302, label %303, label %304

303:                                              ; preds = %293
  store i32 1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %309

304:                                              ; preds = %293, %278
  br label %305

305:                                              ; preds = %304
  %306 = load i32, ptr %6, align 4, !tbaa !9
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %6, align 4, !tbaa !9
  br label %270, !llvm.loop !26

308:                                              ; preds = %270
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %309

309:                                              ; preds = %308, %303
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %310 = load i32, ptr %3, align 4
  ret i32 %310
}

; Function Attrs: nounwind uwtable
declare hidden ptr @__itt_get_lib_name() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @__itt_get_groups() #0

; Function Attrs: nounwind
declare extern_weak ptr @dlopen(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @dlclose(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @__itt_lib_version(ptr noundef) #0

; Function Attrs: nounwind
declare ptr @dlerror() #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nounwind willreturn memory(none) "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 = { alwaysinline 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 }
attributes #6 = { nounwind willreturn memory(none) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 32}
!12 = !{!"___itt_global", !7, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !7, i64 56, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !10, i64 160, !6, i64 168, !10, i64 176}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 40}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!13, !13, i64 0}
!18 = !{!12, !6, i64 96}
!19 = !{!12, !6, i64 120}
!20 = !{!21, !6, i64 0}
!21 = !{!"___itt_api_info", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!22 = !{!21, !10, i64 32}
!23 = !{!21, !6, i64 8}
!24 = !{!21, !6, i64 24}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !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.___itt_global = type { [8 x i8], i64, i64, i64, i64, i64, i64, %union.pthread_mutex_t, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_mutexattr_t = type { i32 }
%struct.___itt_api_info = type { ptr, ptr, ptr, ptr, i32 }

@__itt_sync_create_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_sync_prepare_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_sync_cancel_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_sync_acquired_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_sync_releasing_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_sync_set_name_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_notify_sync_prepare_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_notify_sync_cancel_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_notify_sync_acquired_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_notify_sync_releasing_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_thread_ignore_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt_thr_ignore_ptr__3_0 = external dso_local local_unnamed_addr global ptr, align 8
@__itt__ittapi_global = external dso_local global %struct.___itt_global, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@__itt_init_ittlib.current_thread = external hidden global i64, align 8
@ittnotify_lib_name = external hidden local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@__itt_fini_ittlib_ptr = external hidden local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
declare dso_local void @__itt_fini_ittlib() #0

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

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_init(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_lock(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_unlock(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutex_destroy(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutexattr_init(ptr noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutexattr_settype(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @pthread_mutexattr_destroy(ptr noundef) #2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare extern_weak i64 @pthread_self() #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @__itt_interlocked_increment(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @__itt_report_error_impl(i32 noundef, ...) local_unnamed_addr #0

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

; Function Attrs: nounwind
declare i32 @sched_yield() local_unnamed_addr #2

; Function Attrs: nounwind
declare extern_weak ptr @dlsym(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @__itt_nullify_all_pointers() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @__itt_init_ittlib(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca %union.pthread_mutexattr_t, align 4
  %4 = load volatile i64, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 32), align 8, !tbaa !5
  %.not = icmp eq i64 %4, 0
  br i1 %.not, label %5, label %117

5:                                                ; preds = %2
  %6 = icmp eq <8 x ptr> <ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, ptr @pthread_self>, <ptr @pthread_mutex_init, ptr @pthread_mutex_lock, ptr @pthread_mutex_unlock, ptr @pthread_mutex_destroy, ptr @pthread_mutexattr_init, ptr @pthread_mutexattr_settype, ptr @pthread_mutexattr_destroy, ptr null>
  %7 = bitcast <8 x i1> %6 to i8
  %8 = icmp eq i8 %7, 0
  br i1 %8, label %9, label %31

9:                                                ; preds = %5
  %10 = load volatile i64, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 40), align 8, !tbaa !12
  %.not75 = icmp eq i64 %10, 0
  br i1 %.not75, label %11, label %.loopexit

11:                                               ; preds = %9
  %12 = tail call i64 @__itt_interlocked_increment(ptr noundef nonnull getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 48))
  %13 = icmp eq i64 %12, 1
  br i1 %13, label %15, label %.preheader

.preheader:                                       ; preds = %11
  %14 = load volatile i64, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 40), align 8, !tbaa !12
  %.not7689 = icmp eq i64 %14, 0
  br i1 %.not7689, label %.lr.ph, label %.loopexit

15:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %16 = call i32 @pthread_mutexattr_init(ptr noundef nonnull %3) #5
  %.not77 = icmp eq i32 %16, 0
  br i1 %.not77, label %18, label %17

17:                                               ; preds = %15
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef nonnull @.str, i32 noundef %16)
  br label %18

18:                                               ; preds = %17, %15
  %19 = call i32 @pthread_mutexattr_settype(ptr noundef nonnull %3, i32 noundef 1) #5
  %.not78 = icmp eq i32 %19, 0
  br i1 %.not78, label %21, label %20

20:                                               ; preds = %18
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef nonnull @.str.1, i32 noundef %19)
  br label %21

21:                                               ; preds = %20, %18
  %22 = call i32 @pthread_mutex_init(ptr noundef nonnull getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 56), ptr noundef nonnull %3) #5
  %.not79 = icmp eq i32 %22, 0
  br i1 %.not79, label %24, label %23

23:                                               ; preds = %21
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef nonnull @.str.2, i32 noundef %22)
  br label %24

24:                                               ; preds = %23, %21
  %25 = call i32 @pthread_mutexattr_destroy(ptr noundef nonnull %3) #5
  %.not80 = icmp eq i32 %25, 0
  br i1 %.not80, label %27, label %26

26:                                               ; preds = %24
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 6, ptr noundef nonnull @.str.3, i32 noundef %25)
  br label %27

27:                                               ; preds = %26, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  store volatile i64 1, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 40), align 8, !tbaa !12
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %28 = tail call i32 @sched_yield() #5
  %29 = load volatile i64, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 40), align 8, !tbaa !12
  %.not76 = icmp eq i64 %29, 0
  br i1 %.not76, label %.lr.ph, label %.loopexit, !llvm.loop !13

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %27, %9
  %30 = call i32 @pthread_mutex_lock(ptr noundef nonnull getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 56)) #5
  br label %31

31:                                               ; preds = %.loopexit, %5
  %32 = load volatile i64, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 32), align 8, !tbaa !5
  %.not81 = icmp eq i64 %32, 0
  br i1 %.not81, label %33, label %114

33:                                               ; preds = %31
  %34 = load volatile i64, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !15
  %35 = icmp eq i64 %34, 0
  br i1 %35, label %36, label %114

36:                                               ; preds = %33
  br i1 %8, label %37, label %39

37:                                               ; preds = %36
  %38 = tail call i64 @pthread_self() #6
  store volatile i64 %38, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !15
  br label %39

39:                                               ; preds = %37, %36
  %40 = icmp eq ptr %0, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %39
  %42 = call ptr @__itt_get_lib_name()
  br label %43

43:                                               ; preds = %41, %39
  %.064 = phi ptr [ %42, %41 ], [ %0, %39 ]
  %44 = call i32 @__itt_get_groups()
  %45 = icmp ne ptr @dlopen, null
  %46 = icmp ne ptr @dlsym, null
  %or.cond14 = and i1 %45, %46
  %47 = icmp ne ptr @dlclose, null
  %or.cond15 = and i1 %47, %or.cond14
  br i1 %or.cond15, label %48, label %109

48:                                               ; preds = %43
  %49 = icmp ne i32 %44, 0
  %50 = icmp ne ptr %.064, null
  %or.cond17 = select i1 %49, i1 true, i1 %50
  br i1 %or.cond17, label %51, label %109

51:                                               ; preds = %48
  %52 = icmp eq ptr %.064, null
  %53 = load ptr, ptr @ittnotify_lib_name, align 8
  %54 = select i1 %52, ptr %53, ptr %.064
  %55 = call ptr @dlopen(ptr noundef %54, i32 noundef 1) #5
  store ptr %55, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 96), align 8, !tbaa !16
  %.not82 = icmp eq ptr %55, null
  br i1 %.not82, label %107, label %56

56:                                               ; preds = %51
  %57 = call i32 @__itt_lib_version(ptr noundef nonnull %55)
  switch i32 %57, label %110 [
    i32 0, label %58
    i32 1, label %59
    i32 2, label %103
  ]

58:                                               ; preds = %56
  br label %59

59:                                               ; preds = %58, %56
  %.066 = phi i32 [ %44, %56 ], [ 1, %58 ]
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 120), align 8, !tbaa !17
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %.not8490 = icmp eq ptr %61, null
  br i1 %.not8490, label %._crit_edge, label %.lr.ph92

.lr.ph92:                                         ; preds = %59, %91
  %indvars.iv = phi i64 [ %indvars.iv.next, %91 ], [ 0, %59 ]
  %62 = phi ptr [ %94, %91 ], [ %61, %59 ]
  %63 = phi ptr [ %93, %91 ], [ %60, %59 ]
  %64 = getelementptr inbounds i8, ptr %63, i64 32
  %65 = load i32, ptr %64, align 8, !tbaa !20
  %66 = and i32 %65, %1
  %67 = and i32 %66, %.066
  %.not85 = icmp eq i32 %67, 0
  br i1 %.not85, label %86, label %68

68:                                               ; preds = %.lr.ph92
  %69 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 96), align 8, !tbaa !16
  %70 = call ptr @dlsym(ptr noundef %69, ptr noundef nonnull %62) #5
  %71 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 120), align 8, !tbaa !17
  %72 = getelementptr inbounds %struct.___itt_api_info, ptr %71, i64 %indvars.iv, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !21
  store ptr %70, ptr %73, align 8, !tbaa !22
  %74 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 120), align 8, !tbaa !17
  %75 = getelementptr inbounds %struct.___itt_api_info, ptr %74, i64 %indvars.iv
  %76 = getelementptr inbounds i8, ptr %75, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !21
  %78 = load ptr, ptr %77, align 8, !tbaa !22
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %91

80:                                               ; preds = %68
  %81 = getelementptr inbounds i8, ptr %75, i64 24
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  store ptr %82, ptr %77, align 8, !tbaa !22
  %83 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 120), align 8, !tbaa !17
  %84 = getelementptr inbounds %struct.___itt_api_info, ptr %83, i64 %indvars.iv
  %85 = load ptr, ptr %84, align 8, !tbaa !18
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 2, ptr noundef %.064, ptr noundef %85)
  br label %91

86:                                               ; preds = %.lr.ph92
  %87 = getelementptr inbounds i8, ptr %63, i64 24
  %88 = load ptr, ptr %87, align 8, !tbaa !23
  %89 = getelementptr inbounds i8, ptr %63, i64 8
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  store ptr %88, ptr %90, align 8, !tbaa !22
  br label %91

91:                                               ; preds = %86, %80, %68
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %92 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 120), align 8, !tbaa !17
  %93 = getelementptr inbounds %struct.___itt_api_info, ptr %92, i64 %indvars.iv.next
  %94 = load ptr, ptr %93, align 8, !tbaa !18
  %.not84 = icmp eq ptr %94, null
  br i1 %.not84, label %._crit_edge, label %.lr.ph92, !llvm.loop !24

._crit_edge:                                      ; preds = %91, %59
  %95 = icmp eq i32 %.066, 1
  br i1 %95, label %96, label %110

96:                                               ; preds = %._crit_edge
  %97 = load ptr, ptr @__itt_thr_ignore_ptr__3_0, align 8, !tbaa !22
  store ptr %97, ptr @__itt_thread_ignore_ptr__3_0, align 8, !tbaa !22
  %98 = load ptr, ptr @__itt_sync_set_name_ptr__3_0, align 8, !tbaa !22
  store ptr %98, ptr @__itt_sync_create_ptr__3_0, align 8, !tbaa !22
  %99 = load ptr, ptr @__itt_notify_sync_prepare_ptr__3_0, align 8, !tbaa !22
  store ptr %99, ptr @__itt_sync_prepare_ptr__3_0, align 8, !tbaa !22
  %100 = load ptr, ptr @__itt_notify_sync_cancel_ptr__3_0, align 8, !tbaa !22
  store ptr %100, ptr @__itt_sync_cancel_ptr__3_0, align 8, !tbaa !22
  %101 = load ptr, ptr @__itt_notify_sync_acquired_ptr__3_0, align 8, !tbaa !22
  store ptr %101, ptr @__itt_sync_acquired_ptr__3_0, align 8, !tbaa !22
  %102 = load ptr, ptr @__itt_notify_sync_releasing_ptr__3_0, align 8, !tbaa !22
  store ptr %102, ptr @__itt_sync_releasing_ptr__3_0, align 8, !tbaa !22
  br label %110

103:                                              ; preds = %56
  %104 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 96), align 8, !tbaa !16
  %105 = call ptr @dlsym(ptr noundef %104, ptr noundef nonnull @.str.5) #5
  %.not83 = icmp eq ptr %105, null
  br i1 %.not83, label %110, label %106

106:                                              ; preds = %103
  call void %105(ptr noundef nonnull @__itt__ittapi_global, i32 noundef %1) #5
  br label %110

107:                                              ; preds = %51
  call void @__itt_nullify_all_pointers()
  %108 = call ptr @dlerror() #5
  call void (i32, ...) @__itt_report_error_impl(i32 noundef 1, ptr noundef %.064, ptr noundef %108)
  br label %110

109:                                              ; preds = %48, %43
  call void @__itt_nullify_all_pointers()
  br label %110

110:                                              ; preds = %56, %96, %._crit_edge, %106, %103, %107, %109
  store volatile i64 1, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 32), align 8, !tbaa !5
  store volatile i64 0, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !15
  %111 = load ptr, ptr @__itt_fini_ittlib_ptr, align 8, !tbaa !22
  %112 = icmp eq ptr %111, @__itt_fini_ittlib
  br i1 %112, label %113, label %114

113:                                              ; preds = %110
  store volatile i64 0, ptr @__itt_init_ittlib.current_thread, align 8, !tbaa !15
  br label %114

114:                                              ; preds = %33, %113, %110, %31
  br i1 %8, label %115, label %117

115:                                              ; preds = %114
  %116 = call i32 @pthread_mutex_unlock(ptr noundef nonnull getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 56)) #5
  br label %117

117:                                              ; preds = %114, %115, %2
  %118 = load ptr, ptr getelementptr inbounds (i8, ptr @__itt__ittapi_global, i64 120), align 8, !tbaa !17
  %119 = load ptr, ptr %118, align 8, !tbaa !18
  %.not8693 = icmp eq ptr %119, null
  br i1 %.not8693, label %._crit_edge97, label %.lr.ph96

.lr.ph96:                                         ; preds = %117, %130
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %130 ], [ 0, %117 ]
  %120 = getelementptr inbounds %struct.___itt_api_info, ptr %118, i64 %indvars.iv101
  %121 = getelementptr inbounds i8, ptr %120, i64 8
  %122 = load ptr, ptr %121, align 8, !tbaa !21
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  %124 = getelementptr inbounds i8, ptr %120, i64 24
  %125 = load ptr, ptr %124, align 8, !tbaa !23
  %.not87 = icmp eq ptr %123, %125
  br i1 %.not87, label %130, label %126

126:                                              ; preds = %.lr.ph96
  %127 = getelementptr inbounds i8, ptr %120, i64 32
  %128 = load i32, ptr %127, align 8, !tbaa !20
  %129 = and i32 %128, %1
  %.not88 = icmp eq i32 %129, 0
  br i1 %.not88, label %130, label %._crit_edge97

130:                                              ; preds = %.lr.ph96, %126
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %131 = getelementptr inbounds %struct.___itt_api_info, ptr %118, i64 %indvars.iv.next102
  %132 = load ptr, ptr %131, align 8, !tbaa !18
  %.not86 = icmp eq ptr %132, null
  br i1 %.not86, label %._crit_edge97, label %.lr.ph96, !llvm.loop !25

._crit_edge97:                                    ; preds = %126, %130, %117
  %.0 = phi i32 [ 0, %117 ], [ 0, %130 ], [ 1, %126 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden ptr @__itt_get_lib_name() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @__itt_get_groups() local_unnamed_addr #0

; Function Attrs: nounwind
declare extern_weak ptr @dlopen(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind
declare extern_weak i32 @dlclose(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @__itt_lib_version(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare ptr @dlerror() local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { alwaysinline 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 }
attributes #6 = { nounwind willreturn memory(none) }

!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, !9, i64 32}
!6 = !{!"___itt_global", !7, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !7, i64 56, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !11, i64 160, !10, i64 168, !11, i64 176}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"long", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!6, !9, i64 40}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!9, !9, i64 0}
!16 = !{!6, !10, i64 96}
!17 = !{!6, !10, i64 120}
!18 = !{!19, !10, i64 0}
!19 = !{!"___itt_api_info", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32}
!20 = !{!19, !11, i64 32}
!21 = !{!19, !10, i64 8}
!22 = !{!10, !10, i64 0}
!23 = !{!19, !10, i64 24}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}


; Effective O3 passes: EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass