; LLVM IR from GPUOpen-LibrariesAndSDKs/TAN :: tan/samples/src/GPUUtilities (GPUUtilities)

; 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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%union.cl_device_topology_amd = type { %struct.anon }
%struct.anon = type { i32, [5 x i32] }
%struct.anon.0 = type { i32, [17 x i8], i8, i8, i8 }

@stdout = external global ptr, align 8
@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @listOClDeviceNames(ptr noundef %0, i32 noundef %1, i64 noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [100 x i8], align 16
  %15 = alloca [128 x i8], align 16
  %16 = alloca [100 x i8], align 16
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %union.cl_device_topology_amd, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  store ptr null, ptr %11, align 8, !tbaa !5
  %27 = call i32 @clGetPlatformIDs(i32 noundef 0, ptr noundef null, ptr noundef %9)
  store i32 %27, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %34

30:                                               ; preds = %3
  %31 = load ptr, ptr @stdout, align 8, !tbaa !5
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str, i32 noundef %32) #9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %288

34:                                               ; preds = %3
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = icmp ult i32 0, %35
  br i1 %36, label %37, label %96

37:                                               ; preds = %34
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %39, i64 8)
  %41 = extractvalue { i64, i1 } %40, 1
  %42 = extractvalue { i64, i1 } %40, 0
  %43 = select i1 %41, i64 -1, i64 %42
  %44 = call noalias noundef nonnull ptr @_Znam(i64 noundef %43) #10
  store ptr %44, ptr %11, align 8, !tbaa !5
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = call i32 @clGetPlatformIDs(i32 noundef %45, ptr noundef %46, ptr noundef null)
  store i32 %47, ptr %8, align 4, !tbaa !9
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %58

50:                                               ; preds = %37
  %51 = load ptr, ptr @stdout, align 8, !tbaa !5
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str, i32 noundef %52) #9
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = icmp eq ptr %54, null
  br i1 %55, label %57, label %56

56:                                               ; preds = %50
  call void @_ZdaPv(ptr noundef %54) #11
  br label %57

57:                                               ; preds = %56, %50
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %288

58:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %92, %58
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = icmp ult i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %95

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 100, ptr %14) #9
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %65, i64 %67
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %70 = getelementptr inbounds [100 x i8], ptr %14, i64 0, i64 0
  %71 = call i32 @clGetPlatformInfo(ptr noundef %69, i32 noundef 2307, i64 noundef 100, ptr noundef %70, ptr noundef null)
  store i32 %71, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 128, ptr %15) #9
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 128, i1 false)
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds ptr, ptr %72, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %78 = call i32 @clGetPlatformInfo(ptr noundef %76, i32 noundef 2305, i64 noundef 128, ptr noundef %77, ptr noundef null)
  %79 = getelementptr inbounds [100 x i8], ptr %14, i64 0, i64 0
  %80 = getelementptr inbounds [128 x i8], ptr %15, i64 0, i64 0
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %79, ptr noundef %80)
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %88

84:                                               ; preds = %64
  %85 = load ptr, ptr @stdout, align 8, !tbaa !5
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.2, i32 noundef %86) #9
  store i32 4, ptr %12, align 4
  br label %89

88:                                               ; preds = %64
  store i32 0, ptr %12, align 4
  br label %89

89:                                               ; preds = %88, %84
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 100, ptr %14) #9
  %90 = load i32, ptr %12, align 4
  switch i32 %90, label %290 [
    i32 0, label %91
    i32 4, label %92
  ]

91:                                               ; preds = %89
  br label %92

92:                                               ; preds = %91, %89
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = add i32 %93, 1
  store i32 %94, ptr %13, align 4, !tbaa !9
  br label %59, !llvm.loop !13

95:                                               ; preds = %63
  br label %96

96:                                               ; preds = %95, %34
  call void @llvm.lifetime.start.p0(i64 100, ptr %16) #9
  call void @llvm.memset.p0.i64(ptr align 16 %16, i8 0, i64 100, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %275, %96
  %98 = load i32, ptr %18, align 4, !tbaa !9
  %99 = load i32, ptr %9, align 4, !tbaa !9
  %100 = icmp ult i32 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %278

102:                                              ; preds = %97
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = load i32, ptr %18, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  store ptr %107, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 0, ptr %19, align 4, !tbaa !9
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = load i64, ptr %7, align 8, !tbaa !11
  %110 = call i32 @clGetDeviceIDs(ptr noundef %108, i64 noundef %109, i32 noundef 0, ptr noundef null, ptr noundef %19)
  %111 = load i32, ptr %19, align 4, !tbaa !9
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %114

113:                                              ; preds = %102
  store i32 7, ptr %12, align 4
  br label %272

114:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %115 = load i32, ptr %19, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %116, i64 8)
  %118 = extractvalue { i64, i1 } %117, 1
  %119 = extractvalue { i64, i1 } %117, 0
  %120 = select i1 %118, i64 -1, i64 %119
  %121 = call noalias noundef nonnull ptr @_Znam(i64 noundef %120) #10
  store ptr %121, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %132, %114
  %123 = load i32, ptr %21, align 4, !tbaa !9
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = icmp ult i32 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %135

127:                                              ; preds = %122
  %128 = load ptr, ptr %20, align 8, !tbaa !5
  %129 = load i32, ptr %21, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  store ptr null, ptr %131, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %127
  %133 = load i32, ptr %21, align 4, !tbaa !9
  %134 = add i32 %133, 1
  store i32 %134, ptr %21, align 4, !tbaa !9
  br label %122, !llvm.loop !15

135:                                              ; preds = %126
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = load i64, ptr %7, align 8, !tbaa !11
  %138 = load i32, ptr %19, align 4, !tbaa !9
  %139 = load ptr, ptr %20, align 8, !tbaa !5
  %140 = call i32 @clGetDeviceIDs(ptr noundef %136, i64 noundef %137, i32 noundef %138, ptr noundef %139, ptr noundef %19)
  store i32 %140, ptr %8, align 4, !tbaa !9
  %141 = load i32, ptr %8, align 4, !tbaa !9
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %147

143:                                              ; preds = %135
  %144 = load ptr, ptr @stdout, align 8, !tbaa !5
  %145 = load i32, ptr %8, align 4, !tbaa !9
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.3, i32 noundef %145) #9
  br label %147

147:                                              ; preds = %143, %135
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  %149 = getelementptr inbounds ptr, ptr %148, i64 0
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds [100 x i8], ptr %16, i64 0, i64 0
  %152 = call i32 @clGetDeviceInfo(ptr noundef %150, i32 noundef 4141, i64 noundef 100, ptr noundef %151, ptr noundef null)
  store i32 %152, ptr %8, align 4, !tbaa !9
  %153 = load i32, ptr %8, align 4, !tbaa !9
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %159

155:                                              ; preds = %147
  %156 = load ptr, ptr @stdout, align 8, !tbaa !5
  %157 = load i32, ptr %8, align 4, !tbaa !9
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef @.str.4, i32 noundef %157) #9
  br label %248

159:                                              ; preds = %147
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef @.str.5)
  %162 = getelementptr inbounds [100 x i8], ptr %16, i64 0, i64 0
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %161, ptr noundef %162)
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %165 = load i32, ptr %19, align 4, !tbaa !9
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %164, i32 noundef %165)
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef @.str.6)
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %244, %159
  %170 = load i32, ptr %22, align 4, !tbaa !9
  %171 = load i32, ptr %19, align 4, !tbaa !9
  %172 = icmp ult i32 %170, %171
  br i1 %172, label %173, label %177

173:                                              ; preds = %169
  %174 = load i32, ptr %22, align 4, !tbaa !9
  %175 = load i32, ptr %6, align 4, !tbaa !9
  %176 = icmp ult i32 %174, %175
  br label %177

177:                                              ; preds = %173, %169
  %178 = phi i1 [ false, %169 ], [ %176, %173 ]
  br i1 %178, label %180, label %179

179:                                              ; preds = %177
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %247

180:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %181 = load i32, ptr %17, align 4, !tbaa !9
  %182 = load i32, ptr %22, align 4, !tbaa !9
  %183 = add i32 %181, %182
  store i32 %183, ptr %23, align 4, !tbaa !9
  %184 = call noalias noundef nonnull ptr @_Znam(i64 noundef 100) #10
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = load i32, ptr %23, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds ptr, ptr %185, i64 %187
  store ptr %184, ptr %188, align 8, !tbaa !5
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = load i32, ptr %23, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds ptr, ptr %189, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i64 0
  store i8 0, ptr %194, align 1, !tbaa !16
  %195 = load ptr, ptr %20, align 8, !tbaa !5
  %196 = load i32, ptr %22, align 4, !tbaa !9
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds ptr, ptr %195, i64 %197
  %199 = load ptr, ptr %198, align 8, !tbaa !5
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = load i32, ptr %23, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds ptr, ptr %200, i64 %202
  %204 = load ptr, ptr %203, align 8, !tbaa !5
  %205 = call i32 @clGetDeviceInfo(ptr noundef %199, i32 noundef 4139, i64 noundef 100, ptr noundef %204, ptr noundef null)
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
  %207 = load ptr, ptr %5, align 8, !tbaa !5
  %208 = load i32, ptr %23, align 4, !tbaa !9
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds ptr, ptr %207, i64 %209
  %211 = load ptr, ptr %210, align 8, !tbaa !5
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %206, ptr noundef %211)
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %212, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #9
  %214 = load ptr, ptr %20, align 8, !tbaa !5
  %215 = load i32, ptr %22, align 4, !tbaa !9
  %216 = zext i32 %215 to i64
  %217 = getelementptr inbounds ptr, ptr %214, i64 %216
  %218 = load ptr, ptr %217, align 8, !tbaa !5
  %219 = call i32 @clGetDeviceInfo(ptr noundef %218, i32 noundef 16439, i64 noundef 24, ptr noundef %24, ptr noundef null)
  store i32 %219, ptr %8, align 4, !tbaa !9
  %220 = load i32, ptr %8, align 4, !tbaa !9
  %221 = icmp eq i32 %220, 0
  br i1 %221, label %222, label %234

222:                                              ; preds = %180
  %223 = load ptr, ptr @stdout, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.anon.0, ptr %24, i32 0, i32 2
  %225 = load i8, ptr %224, align 1, !tbaa !16
  %226 = sext i8 %225 to i32
  %227 = getelementptr inbounds %struct.anon.0, ptr %24, i32 0, i32 3
  %228 = load i8, ptr %227, align 2, !tbaa !16
  %229 = sext i8 %228 to i32
  %230 = getelementptr inbounds %struct.anon.0, ptr %24, i32 0, i32 4
  %231 = load i8, ptr %230, align 1, !tbaa !16
  %232 = sext i8 %231 to i32
  %233 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %223, ptr noundef @.str.8, i32 noundef %226, i32 noundef %229, i32 noundef %232) #9
  br label %234

234:                                              ; preds = %222, %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 0, ptr %25, align 4, !tbaa !9
  %235 = load ptr, ptr %20, align 8, !tbaa !5
  %236 = load i32, ptr %22, align 4, !tbaa !9
  %237 = zext i32 %236 to i64
  %238 = getelementptr inbounds ptr, ptr %235, i64 %237
  %239 = load ptr, ptr %238, align 8, !tbaa !5
  %240 = call i32 @clGetDeviceInfo(ptr noundef %239, i32 noundef 4098, i64 noundef 4, ptr noundef %25, ptr noundef null)
  %241 = load ptr, ptr @stdout, align 8, !tbaa !5
  %242 = load i32, ptr %25, align 4, !tbaa !9
  %243 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %241, ptr noundef @.str.9, i32 noundef %242) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %244

244:                                              ; preds = %234
  %245 = load i32, ptr %22, align 4, !tbaa !9
  %246 = add i32 %245, 1
  store i32 %246, ptr %22, align 4, !tbaa !9
  br label %169, !llvm.loop !17

247:                                              ; preds = %179
  br label %248

248:                                              ; preds = %247, %155
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %249

249:                                              ; preds = %261, %248
  %250 = load i32, ptr %26, align 4, !tbaa !9
  %251 = load i32, ptr %19, align 4, !tbaa !9
  %252 = icmp ult i32 %250, %251
  br i1 %252, label %254, label %253

253:                                              ; preds = %249
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %264

254:                                              ; preds = %249
  %255 = load ptr, ptr %20, align 8, !tbaa !5
  %256 = load i32, ptr %26, align 4, !tbaa !9
  %257 = zext i32 %256 to i64
  %258 = getelementptr inbounds ptr, ptr %255, i64 %257
  %259 = load ptr, ptr %258, align 8, !tbaa !5
  %260 = call i32 @clReleaseDevice(ptr noundef %259)
  br label %261

261:                                              ; preds = %254
  %262 = load i32, ptr %26, align 4, !tbaa !9
  %263 = add i32 %262, 1
  store i32 %263, ptr %26, align 4, !tbaa !9
  br label %249, !llvm.loop !18

264:                                              ; preds = %253
  %265 = load i32, ptr %19, align 4, !tbaa !9
  %266 = load i32, ptr %17, align 4, !tbaa !9
  %267 = add i32 %266, %265
  store i32 %267, ptr %17, align 4, !tbaa !9
  %268 = load ptr, ptr %20, align 8, !tbaa !5
  %269 = icmp eq ptr %268, null
  br i1 %269, label %271, label %270

270:                                              ; preds = %264
  call void @_ZdaPv(ptr noundef %268) #11
  br label %271

271:                                              ; preds = %270, %264
  store ptr null, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  store i32 0, ptr %12, align 4
  br label %272

272:                                              ; preds = %271, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  %273 = load i32, ptr %12, align 4
  switch i32 %273, label %290 [
    i32 0, label %274
    i32 7, label %275
  ]

274:                                              ; preds = %272
  br label %275

275:                                              ; preds = %274, %272
  %276 = load i32, ptr %18, align 4, !tbaa !9
  %277 = add i32 %276, 1
  store i32 %277, ptr %18, align 4, !tbaa !9
  br label %97, !llvm.loop !19

278:                                              ; preds = %101
  %279 = load ptr, ptr %11, align 8, !tbaa !5
  %280 = icmp ne ptr %279, null
  br i1 %280, label %281, label %286

281:                                              ; preds = %278
  %282 = load ptr, ptr %11, align 8, !tbaa !5
  %283 = icmp eq ptr %282, null
  br i1 %283, label %285, label %284

284:                                              ; preds = %281
  call void @_ZdaPv(ptr noundef %282) #11
  br label %285

285:                                              ; preds = %284, %281
  br label %286

286:                                              ; preds = %285, %278
  %287 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %287, ptr %4, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 100, ptr %16) #9
  br label %288

288:                                              ; preds = %286, %57, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  %289 = load i32, ptr %4, align 4
  ret i32 %289

290:                                              ; preds = %272, %89
  unreachable
}

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

declare i32 @clGetPlatformIDs(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #4

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #6

declare i32 @clGetPlatformInfo(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) #2

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

declare i32 @printf(ptr noundef, ...) #2

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

declare i32 @clGetDeviceIDs(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare i32 @clGetDeviceInfo(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

declare i32 @clReleaseDevice(ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


; 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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%union.cl_device_topology_amd = type { %struct.anon }
%struct.anon = type { i32, [5 x i32] }

@stdout = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [36 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @listOClDeviceNames(ptr nocapture noundef %0, i32 noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = alloca [100 x i8], align 16
  %6 = alloca [128 x i8], align 16
  %7 = alloca [100 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca %union.cl_device_topology_amd, align 4
  %10 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  %11 = call i32 @clGetPlatformIDs(i32 noundef 0, ptr noundef null, ptr noundef nonnull %4)
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %15, label %12

12:                                               ; preds = %3
  %13 = load ptr, ptr @stdout, align 8, !tbaa !9
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str, i32 noundef %11) #8
  br label %124

15:                                               ; preds = %3
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %.not78 = icmp eq i32 %16, 0
  br i1 %.not78, label %._crit_edge96.thread121, label %17

._crit_edge96.thread121:                          ; preds = %15
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %7) #8
  br label %123

17:                                               ; preds = %15
  %18 = zext i32 %16 to i64
  %19 = shl nuw nsw i64 %18, 3
  %20 = call noalias noundef nonnull ptr @_Znam(i64 noundef %19) #9
  %21 = call i32 @clGetPlatformIDs(i32 noundef %16, ptr noundef nonnull %20, ptr noundef null)
  %.not79 = icmp eq i32 %21, 0
  br i1 %.not79, label %.preheader, label %23

.preheader:                                       ; preds = %17
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %.not98 = icmp eq i32 %22, 0
  br i1 %.not98, label %._crit_edge96, label %.lr.ph

23:                                               ; preds = %17
  %24 = load ptr, ptr @stdout, align 8, !tbaa !9
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str, i32 noundef %21) #8
  call void @_ZdaPv(ptr noundef nonnull %20) #10
  br label %124

.lr.ph:                                           ; preds = %.preheader, %35
  %indvars.iv = phi i64 [ %indvars.iv.next, %35 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %5) #8
  %26 = getelementptr inbounds ptr, ptr %20, i64 %indvars.iv
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = call i32 @clGetPlatformInfo(ptr noundef %27, i32 noundef 2307, i64 noundef 100, ptr noundef nonnull %5, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %6, i8 0, i64 128, i1 false)
  %29 = load ptr, ptr %26, align 8, !tbaa !9
  %30 = call i32 @clGetPlatformInfo(ptr noundef %29, i32 noundef 2305, i64 noundef 128, ptr noundef nonnull %6, ptr noundef null)
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %.not83 = icmp eq i32 %28, 0
  br i1 %.not83, label %35, label %32

32:                                               ; preds = %.lr.ph
  %33 = load ptr, ptr @stdout, align 8, !tbaa !9
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.2, i32 noundef %28) #8
  br label %35

35:                                               ; preds = %.lr.ph, %32
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %5) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = zext i32 %36 to i64
  %38 = icmp ult i64 %indvars.iv.next, %37
  br i1 %38, label %.lr.ph, label %.loopexit84, !llvm.loop !11

.loopexit84:                                      ; preds = %35
  %39 = icmp eq i32 %36, 0
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %7) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %7, i8 0, i64 100, i1 false)
  br i1 %39, label %._crit_edge96.thread, label %.lr.ph95

.lr.ph95:                                         ; preds = %.loopexit84
  %40 = icmp ne i32 %1, 0
  %41 = getelementptr inbounds i8, ptr %9, i64 21
  %42 = getelementptr inbounds i8, ptr %9, i64 22
  %43 = getelementptr inbounds i8, ptr %9, i64 23
  br label %44

._crit_edge96:                                    ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %7) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %7, i8 0, i64 100, i1 false)
  br label %._crit_edge96.thread

44:                                               ; preds = %.lr.ph95, %119
  %indvars.iv109 = phi i64 [ 0, %.lr.ph95 ], [ %indvars.iv.next110, %119 ]
  %.06691 = phi i32 [ 0, %.lr.ph95 ], [ %.1, %119 ]
  %45 = getelementptr inbounds ptr, ptr %20, i64 %indvars.iv109
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  %47 = call i32 @clGetDeviceIDs(ptr noundef %46, i64 noundef %2, i32 noundef 0, ptr noundef null, ptr noundef nonnull %8)
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %119, label %50

50:                                               ; preds = %44
  %51 = zext i32 %48 to i64
  %52 = shl nuw nsw i64 %51, 3
  %53 = call noalias noundef nonnull ptr @_Znam(i64 noundef %52) #9
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %53, i8 0, i64 %52, i1 false), !tbaa !9
  %54 = call i32 @clGetDeviceIDs(ptr noundef %46, i64 noundef %2, i32 noundef %48, ptr noundef nonnull %53, ptr noundef nonnull %8)
  %.not81 = icmp eq i32 %54, 0
  br i1 %.not81, label %58, label %55

55:                                               ; preds = %50
  %56 = load ptr, ptr @stdout, align 8, !tbaa !9
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.3, i32 noundef %54) #8
  br label %58

58:                                               ; preds = %55, %50
  %59 = load ptr, ptr %53, align 8, !tbaa !9
  %60 = call i32 @clGetDeviceInfo(ptr noundef %59, i32 noundef 4141, i64 noundef 100, ptr noundef nonnull %7, ptr noundef null)
  %.not82 = icmp eq i32 %60, 0
  br i1 %.not82, label %64, label %61

61:                                               ; preds = %58
  %62 = load ptr, ptr @stdout, align 8, !tbaa !9
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.4, i32 noundef %60) #8
  %.pre = load i32, ptr %8, align 4, !tbaa !5
  br label %.loopexit

64:                                               ; preds = %58
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @.str.5)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull %7)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %68, i32 noundef %69)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull @.str.6)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = icmp ne i32 %73, 0
  %75 = and i1 %40, %74
  br i1 %75, label %.lr.ph88, label %.loopexit

.lr.ph88:                                         ; preds = %64, %100
  %.06387 = phi i32 [ %106, %100 ], [ 0, %64 ]
  %76 = add i32 %.06387, %.06691
  %77 = call noalias noundef nonnull dereferenceable(100) ptr @_Znam(i64 noundef 100) #9
  %78 = sext i32 %76 to i64
  %79 = getelementptr inbounds ptr, ptr %0, i64 %78
  store ptr %77, ptr %79, align 8, !tbaa !9
  store i8 0, ptr %77, align 1, !tbaa !13
  %80 = zext i32 %.06387 to i64
  %81 = getelementptr inbounds ptr, ptr %53, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = call i32 @clGetDeviceInfo(ptr noundef %82, i32 noundef 4139, i64 noundef 100, ptr noundef nonnull %77, ptr noundef null)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
  %85 = load ptr, ptr %79, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef %85)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  %88 = load ptr, ptr %81, align 8, !tbaa !9
  %89 = call i32 @clGetDeviceInfo(ptr noundef %88, i32 noundef 16439, i64 noundef 24, ptr noundef nonnull %9, ptr noundef null)
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %100

91:                                               ; preds = %.lr.ph88
  %92 = load ptr, ptr @stdout, align 8, !tbaa !9
  %93 = load i8, ptr %41, align 1, !tbaa !13
  %94 = sext i8 %93 to i32
  %95 = load i8, ptr %42, align 2, !tbaa !13
  %96 = sext i8 %95 to i32
  %97 = load i8, ptr %43, align 1, !tbaa !13
  %98 = sext i8 %97 to i32
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef nonnull @.str.8, i32 noundef %94, i32 noundef %96, i32 noundef %98) #8
  br label %100

100:                                              ; preds = %91, %.lr.ph88
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  %101 = load ptr, ptr %81, align 8, !tbaa !9
  %102 = call i32 @clGetDeviceInfo(ptr noundef %101, i32 noundef 4098, i64 noundef 4, ptr noundef nonnull %10, ptr noundef null)
  %103 = load ptr, ptr @stdout, align 8, !tbaa !9
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull @.str.9, i32 noundef %104) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  %106 = add nuw i32 %.06387, 1
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = icmp ult i32 %106, %107
  %109 = icmp ult i32 %106, %1
  %110 = and i1 %109, %108
  br i1 %110, label %.lr.ph88, label %.loopexit, !llvm.loop !14

.loopexit:                                        ; preds = %100, %64, %61
  %111 = phi i32 [ %73, %64 ], [ %.pre, %61 ], [ %107, %100 ]
  %.not100 = icmp eq i32 %111, 0
  br i1 %.not100, label %._crit_edge, label %.lr.ph90

._crit_edge:                                      ; preds = %.lr.ph90, %.loopexit
  %.lcssa = phi i32 [ 0, %.loopexit ], [ %116, %.lr.ph90 ]
  %112 = add i32 %.lcssa, %.06691
  call void @_ZdaPv(ptr noundef nonnull %53) #10
  br label %119

.lr.ph90:                                         ; preds = %.loopexit, %.lr.ph90
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %.lr.ph90 ], [ 0, %.loopexit ]
  %113 = getelementptr inbounds ptr, ptr %53, i64 %indvars.iv106
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  %115 = call i32 @clReleaseDevice(ptr noundef %114)
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = zext i32 %116 to i64
  %118 = icmp ult i64 %indvars.iv.next107, %117
  br i1 %118, label %.lr.ph90, label %._crit_edge, !llvm.loop !15

119:                                              ; preds = %44, %._crit_edge
  %.1 = phi i32 [ %112, %._crit_edge ], [ %.06691, %44 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = zext i32 %120 to i64
  %122 = icmp ult i64 %indvars.iv.next110, %121
  br i1 %122, label %44, label %._crit_edge96.thread, !llvm.loop !16

._crit_edge96.thread:                             ; preds = %119, %.loopexit84, %._crit_edge96
  %.066.lcssa119 = phi i32 [ 0, %._crit_edge96 ], [ 0, %.loopexit84 ], [ %.1, %119 ]
  call void @_ZdaPv(ptr noundef nonnull %20) #10
  br label %123

123:                                              ; preds = %._crit_edge96.thread121, %._crit_edge96.thread
  %.066.lcssa120 = phi i32 [ %.066.lcssa119, %._crit_edge96.thread ], [ 0, %._crit_edge96.thread121 ]
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %7) #8
  br label %124

124:                                              ; preds = %123, %23, %12
  %.062 = phi i32 [ 0, %12 ], [ 0, %23 ], [ %.066.lcssa120, %123 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  ret i32 %.062
}

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

declare i32 @clGetPlatformIDs(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

declare i32 @clGetPlatformInfo(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

declare i32 @clGetDeviceIDs(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @clGetDeviceInfo(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0 align 2

declare i32 @clReleaseDevice(ptr noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass