; LLVM IR from ANL-CESAR/XSBench :: opencl (CLutils)

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

@.str.72 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [36 x i8], align 1

declare i32 @printf(ptr noundef, ...) #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 allocsize(0)
declare noalias ptr @malloc(i64 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 @clGetDeviceInfo(ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @print_opencl_info() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %10 = call i32 @clGetPlatformIDs(i32 noundef 0, ptr noundef null, ptr noundef %5)
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %12 = call i32 (ptr, ...) @printf(ptr noundef @.str.72, i32 noundef %11)
  %13 = load i32, ptr %5, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = mul i64 8, %14
  %16 = call noalias ptr @malloc(i64 noundef %15) #6
  store ptr %16, ptr %6, align 8, !tbaa !9
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = load ptr, ptr %6, align 8, !tbaa !9
  %19 = call i32 @clGetPlatformIDs(i32 noundef %17, ptr noundef %18, ptr noundef null)
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %149, %0
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = icmp ult i32 %21, %22
  br i1 %23, label %24, label %152

24:                                               ; preds = %20
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.73, i32 noundef %25)
  %27 = load ptr, ptr %6, align 8, !tbaa !9
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds ptr, ptr %27, i64 %29
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call i32 @clGetDeviceIDs(ptr noundef %31, i64 noundef 4294967295, i32 noundef 0, ptr noundef null, ptr noundef %7)
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = zext i32 %33 to i64
  %35 = mul i64 8, %34
  %36 = call noalias ptr @malloc(i64 noundef %35) #6
  store ptr %36, ptr %8, align 8, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !9
  %38 = load i32, ptr %1, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds ptr, ptr %37, i64 %39
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !9
  %44 = call i32 @clGetDeviceIDs(ptr noundef %41, i64 noundef 4294967295, i32 noundef %42, ptr noundef %43, ptr noundef null)
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %144, %24
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = icmp ult i32 %46, %47
  br i1 %48, label %49, label %147

49:                                               ; preds = %45
  %50 = load ptr, ptr %8, align 8, !tbaa !9
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds ptr, ptr %50, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = call i32 @clGetDeviceInfo(ptr noundef %54, i32 noundef 4139, i64 noundef 0, ptr noundef null, ptr noundef %4)
  %56 = load i64, ptr %4, align 8, !tbaa !11
  %57 = call noalias ptr @malloc(i64 noundef %56) #6
  store ptr %57, ptr %3, align 8, !tbaa !9
  %58 = load ptr, ptr %8, align 8, !tbaa !9
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = load i64, ptr %4, align 8, !tbaa !11
  %64 = load ptr, ptr %3, align 8, !tbaa !9
  %65 = call i32 @clGetDeviceInfo(ptr noundef %62, i32 noundef 4139, i64 noundef %63, ptr noundef %64, ptr noundef null)
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  %68 = load ptr, ptr %3, align 8, !tbaa !9
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.74, i32 noundef %67, ptr noundef %68)
  %70 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %70) #5
  %71 = load ptr, ptr %8, align 8, !tbaa !9
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds ptr, ptr %71, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = call i32 @clGetDeviceInfo(ptr noundef %75, i32 noundef 4143, i64 noundef 0, ptr noundef null, ptr noundef %4)
  %77 = load i64, ptr %4, align 8, !tbaa !11
  %78 = call noalias ptr @malloc(i64 noundef %77) #6
  store ptr %78, ptr %3, align 8, !tbaa !9
  %79 = load ptr, ptr %8, align 8, !tbaa !9
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds ptr, ptr %79, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = load i64, ptr %4, align 8, !tbaa !11
  %85 = load ptr, ptr %3, align 8, !tbaa !9
  %86 = call i32 @clGetDeviceInfo(ptr noundef %83, i32 noundef 4143, i64 noundef %84, ptr noundef %85, ptr noundef null)
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  %89 = load ptr, ptr %3, align 8, !tbaa !9
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.75, i32 noundef %88, i32 noundef 1, ptr noundef %89)
  %91 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %91) #5
  %92 = load ptr, ptr %8, align 8, !tbaa !9
  %93 = load i32, ptr %2, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = call i32 @clGetDeviceInfo(ptr noundef %96, i32 noundef 4141, i64 noundef 0, ptr noundef null, ptr noundef %4)
  %98 = load i64, ptr %4, align 8, !tbaa !11
  %99 = call noalias ptr @malloc(i64 noundef %98) #6
  store ptr %99, ptr %3, align 8, !tbaa !9
  %100 = load ptr, ptr %8, align 8, !tbaa !9
  %101 = load i32, ptr %2, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = load i64, ptr %4, align 8, !tbaa !11
  %106 = load ptr, ptr %3, align 8, !tbaa !9
  %107 = call i32 @clGetDeviceInfo(ptr noundef %104, i32 noundef 4141, i64 noundef %105, ptr noundef %106, ptr noundef null)
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  %110 = load ptr, ptr %3, align 8, !tbaa !9
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.76, i32 noundef %109, i32 noundef 2, ptr noundef %110)
  %112 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %112) #5
  %113 = load ptr, ptr %8, align 8, !tbaa !9
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds ptr, ptr %113, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = call i32 @clGetDeviceInfo(ptr noundef %117, i32 noundef 4157, i64 noundef 0, ptr noundef null, ptr noundef %4)
  %119 = load i64, ptr %4, align 8, !tbaa !11
  %120 = call noalias ptr @malloc(i64 noundef %119) #6
  store ptr %120, ptr %3, align 8, !tbaa !9
  %121 = load ptr, ptr %8, align 8, !tbaa !9
  %122 = load i32, ptr %2, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds ptr, ptr %121, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = load i64, ptr %4, align 8, !tbaa !11
  %127 = load ptr, ptr %3, align 8, !tbaa !9
  %128 = call i32 @clGetDeviceInfo(ptr noundef %125, i32 noundef 4157, i64 noundef %126, ptr noundef %127, ptr noundef null)
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  %131 = load ptr, ptr %3, align 8, !tbaa !9
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.77, i32 noundef %130, i32 noundef 3, ptr noundef %131)
  %133 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %133) #5
  %134 = load ptr, ptr %8, align 8, !tbaa !9
  %135 = load i32, ptr %2, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %134, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !9
  %139 = call i32 @clGetDeviceInfo(ptr noundef %138, i32 noundef 4098, i64 noundef 4, ptr noundef %9, ptr noundef null)
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = call i32 (ptr, ...) @printf(ptr noundef @.str.78, i32 noundef %141, i32 noundef 4, i32 noundef %142)
  br label %144

144:                                              ; preds = %49
  %145 = load i32, ptr %2, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %2, align 4, !tbaa !5
  br label %45, !llvm.loop !13

147:                                              ; preds = %45
  %148 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %148) #5
  br label %149

149:                                              ; preds = %147
  %150 = load i32, ptr %1, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %1, align 4, !tbaa !5
  br label %20, !llvm.loop !15

152:                                              ; preds = %20
  %153 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %153) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

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

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

attributes #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 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 #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 = { 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 allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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}


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

@.str.72 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @print_opencl_info() local_unnamed_addr #5 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %5 = call i32 @clGetPlatformIDs(i32 noundef 0, ptr noundef null, ptr noundef nonnull %2) #6
  %6 = load i32, ptr %2, align 4, !tbaa !5
  %7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.72, i32 noundef %6)
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = zext i32 %8 to i64
  %10 = shl nuw nsw i64 %9, 3
  %11 = call noalias ptr @malloc(i64 noundef %10) #7
  %12 = call i32 @clGetPlatformIDs(i32 noundef %8, ptr noundef %11, ptr noundef null) #6
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %._crit_edge52, label %.lr.ph51

.lr.ph51:                                         ; preds = %0, %._crit_edge
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %._crit_edge ], [ 0, %0 ]
  %14 = trunc nuw nsw i64 %indvars.iv55 to i32
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.73, i32 noundef %14)
  %16 = getelementptr inbounds ptr, ptr %11, i64 %indvars.iv55
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = call i32 @clGetDeviceIDs(ptr noundef %17, i64 noundef 4294967295, i32 noundef 0, ptr noundef null, ptr noundef nonnull %3) #6
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = zext i32 %19 to i64
  %21 = shl nuw nsw i64 %20, 3
  %22 = call noalias ptr @malloc(i64 noundef %21) #7
  %23 = load ptr, ptr %16, align 8, !tbaa !9
  %24 = call i32 @clGetDeviceIDs(ptr noundef %23, i64 noundef 4294967295, i32 noundef %19, ptr noundef %22, ptr noundef null) #6
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %.not53 = icmp eq i32 %25, 0
  br i1 %.not53, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph51, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph51 ]
  %26 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = call i32 @clGetDeviceInfo(ptr noundef %27, i32 noundef 4139, i64 noundef 0, ptr noundef null, ptr noundef nonnull %1) #6
  %29 = load i64, ptr %1, align 8, !tbaa !11
  %30 = call noalias ptr @malloc(i64 noundef %29) #7
  %31 = load ptr, ptr %26, align 8, !tbaa !9
  %32 = call i32 @clGetDeviceInfo(ptr noundef %31, i32 noundef 4139, i64 noundef %29, ptr noundef %30, ptr noundef null) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = trunc nuw i64 %indvars.iv.next to i32
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.74, i32 noundef %33, ptr noundef %30)
  call void @free(ptr noundef %30) #6
  %35 = load ptr, ptr %26, align 8, !tbaa !9
  %36 = call i32 @clGetDeviceInfo(ptr noundef %35, i32 noundef 4143, i64 noundef 0, ptr noundef null, ptr noundef nonnull %1) #6
  %37 = load i64, ptr %1, align 8, !tbaa !11
  %38 = call noalias ptr @malloc(i64 noundef %37) #7
  %39 = load ptr, ptr %26, align 8, !tbaa !9
  %40 = call i32 @clGetDeviceInfo(ptr noundef %39, i32 noundef 4143, i64 noundef %37, ptr noundef %38, ptr noundef null) #6
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.75, i32 noundef %33, i32 noundef 1, ptr noundef %38)
  call void @free(ptr noundef %38) #6
  %42 = load ptr, ptr %26, align 8, !tbaa !9
  %43 = call i32 @clGetDeviceInfo(ptr noundef %42, i32 noundef 4141, i64 noundef 0, ptr noundef null, ptr noundef nonnull %1) #6
  %44 = load i64, ptr %1, align 8, !tbaa !11
  %45 = call noalias ptr @malloc(i64 noundef %44) #7
  %46 = load ptr, ptr %26, align 8, !tbaa !9
  %47 = call i32 @clGetDeviceInfo(ptr noundef %46, i32 noundef 4141, i64 noundef %44, ptr noundef %45, ptr noundef null) #6
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.76, i32 noundef %33, i32 noundef 2, ptr noundef %45)
  call void @free(ptr noundef %45) #6
  %49 = load ptr, ptr %26, align 8, !tbaa !9
  %50 = call i32 @clGetDeviceInfo(ptr noundef %49, i32 noundef 4157, i64 noundef 0, ptr noundef null, ptr noundef nonnull %1) #6
  %51 = load i64, ptr %1, align 8, !tbaa !11
  %52 = call noalias ptr @malloc(i64 noundef %51) #7
  %53 = load ptr, ptr %26, align 8, !tbaa !9
  %54 = call i32 @clGetDeviceInfo(ptr noundef %53, i32 noundef 4157, i64 noundef %51, ptr noundef %52, ptr noundef null) #6
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.77, i32 noundef %33, i32 noundef 3, ptr noundef %52)
  call void @free(ptr noundef %52) #6
  %56 = load ptr, ptr %26, align 8, !tbaa !9
  %57 = call i32 @clGetDeviceInfo(ptr noundef %56, i32 noundef 4098, i64 noundef 4, ptr noundef nonnull %4, ptr noundef null) #6
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.78, i32 noundef %33, i32 noundef 4, i32 noundef %58)
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = zext i32 %60 to i64
  %62 = icmp ult i64 %indvars.iv.next, %61
  br i1 %62, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph51
  call void @free(ptr noundef %22) #6
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = icmp ult i64 %indvars.iv.next56, %64
  br i1 %65, label %.lr.ph51, label %._crit_edge52, !llvm.loop !15

._crit_edge52:                                    ; preds = %._crit_edge, %0
  call void @free(ptr noundef %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void
}

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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}


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