; LLVM IR from ChenyangZhang-cs/iMLBench :: KNN/co-run&zero-copy/clutils.ll (Z26printSupportedImageFormatsv)

; 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._cl_image_format = type { i32, i32 }

@_ZL7context = external hidden global ptr, align 8
@.str.91 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [38 x i8], align 1
@__const._Z26printSupportedImageFormatsv.orders = external hidden unnamed_addr constant [10 x i32], align 16
@__const._Z26printSupportedImageFormatsv.orderstr = external hidden unnamed_addr constant [10 x ptr], align 16
@__const._Z26printSupportedImageFormatsv.types = external hidden unnamed_addr constant [15 x i32], align 16
@__const._Z26printSupportedImageFormatsv.typesstr = external hidden unnamed_addr constant [15 x ptr], align 16
@.str.118 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z9cl_errChkiPKcb(i32 noundef, ptr noundef, i1 noundef zeroext) #1

declare noundef ptr @_Z5allocm(i64 noundef) #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26printSupportedImageFormatsv() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca [10 x i32], align 16
  %5 = alloca [10 x ptr], align 16
  %6 = alloca [15 x i32], align 16
  %7 = alloca [15 x ptr], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = 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
  %12 = load ptr, ptr @_ZL7context, align 8, !tbaa !5
  %13 = call i32 @clGetSupportedImageFormats(ptr noundef %12, i64 noundef 0, i32 noundef 4337, i32 noundef 0, ptr noundef null, ptr noundef %1)
  store i32 %13, ptr %2, align 4, !tbaa !9
  %14 = load i32, ptr %2, align 4, !tbaa !9
  %15 = call noundef i32 @_Z9cl_errChkiPKcb(i32 noundef %14, ptr noundef @.str.91, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  %16 = load i32, ptr %1, align 4, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = mul i64 8, %17
  %19 = call noundef ptr @_Z5allocm(i64 noundef %18)
  store ptr %19, ptr %3, align 8, !tbaa !5
  %20 = load ptr, ptr @_ZL7context, align 8, !tbaa !5
  %21 = load i32, ptr %1, align 4, !tbaa !9
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call i32 @clGetSupportedImageFormats(ptr noundef %20, i64 noundef 0, i32 noundef 4337, i32 noundef %21, ptr noundef %22, ptr noundef null)
  store i32 %23, ptr %2, align 4, !tbaa !9
  %24 = load i32, ptr %1, align 4, !tbaa !9
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.92, i32 noundef %24)
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const._Z26printSupportedImageFormatsv.orders, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const._Z26printSupportedImageFormatsv.orderstr, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 60, ptr %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const._Z26printSupportedImageFormatsv.types, i64 60, i1 false)
  call void @llvm.lifetime.start.p0(i64 120, ptr %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const._Z26printSupportedImageFormatsv.typesstr, i64 120, i1 false)
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.118)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %90, %0
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = load i32, ptr %1, align 4, !tbaa !9
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %93

32:                                               ; preds = %27
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.119, i32 noundef %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %58, %32
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = icmp slt i32 %36, 10
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %61

39:                                               ; preds = %35
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct._cl_image_format, ptr %40, i64 %42
  %44 = getelementptr inbounds %struct._cl_image_format, ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [10 x i32], ptr %4, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp eq i32 %45, %49
  br i1 %50, label %51, label %57

51:                                               ; preds = %39
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [10 x ptr], ptr %5, i64 0, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.120, ptr noundef %55)
  br label %57

57:                                               ; preds = %51, %39
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %10, align 4, !tbaa !9
  br label %35, !llvm.loop !13

61:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %85, %61
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = icmp slt i32 %63, 15
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %88

66:                                               ; preds = %62
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %struct._cl_image_format, ptr %67, i64 %69
  %71 = getelementptr inbounds %struct._cl_image_format, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !15
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [15 x i32], ptr %6, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = icmp eq i32 %72, %76
  br i1 %77, label %78, label %84

78:                                               ; preds = %66
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [15 x ptr], ptr %7, i64 0, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.120, ptr noundef %82)
  br label %84

84:                                               ; preds = %78, %66
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %11, align 4, !tbaa !9
  br label %62, !llvm.loop !16

88:                                               ; preds = %65
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.121)
  br label %90

90:                                               ; preds = %88
  %91 = load i32, ptr %8, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %8, align 4, !tbaa !9
  br label %27, !llvm.loop !17

93:                                               ; preds = %31
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %94) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 60, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 40, 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
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!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, !10, i64 0}
!12 = !{!"_ZTS16_cl_image_format", !10, i64 0, !10, i64 4}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!12, !10, i64 4}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !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"

%struct._cl_image_format = type { i32, i32 }

@_ZL7context = external hidden local_unnamed_addr global ptr, align 8
@.str.91 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [38 x i8], align 1
@__const._Z26printSupportedImageFormatsv.orders = external hidden unnamed_addr constant [10 x i32], align 16
@__const._Z26printSupportedImageFormatsv.orderstr = external hidden unnamed_addr constant [10 x ptr], align 16
@__const._Z26printSupportedImageFormatsv.types = external hidden unnamed_addr constant [15 x i32], align 16
@__const._Z26printSupportedImageFormatsv.typesstr = external hidden unnamed_addr constant [15 x ptr], align 16
@.str.118 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z9cl_errChkiPKcb(i32 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare noundef ptr @_Z5allocm(i64 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26printSupportedImageFormatsv() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %2 = load ptr, ptr @_ZL7context, align 8, !tbaa !5
  %3 = call i32 @clGetSupportedImageFormats(ptr noundef %2, i64 noundef 0, i32 noundef 4337, i32 noundef 0, ptr noundef null, ptr noundef nonnull %1)
  %4 = call noundef i32 @_Z9cl_errChkiPKcb(i32 noundef %3, ptr noundef nonnull @.str.91, i1 noundef zeroext true)
  %5 = load i32, ptr %1, align 4, !tbaa !9
  %6 = zext i32 %5 to i64
  %7 = shl nuw nsw i64 %6, 3
  %8 = call noundef ptr @_Z5allocm(i64 noundef %7)
  %9 = load ptr, ptr @_ZL7context, align 8, !tbaa !5
  %10 = load i32, ptr %1, align 4, !tbaa !9
  %11 = call i32 @clGetSupportedImageFormats(ptr noundef %9, i64 noundef 0, i32 noundef 4337, i32 noundef %10, ptr noundef %8, ptr noundef null)
  %12 = load i32, ptr %1, align 4, !tbaa !9
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.92, i32 noundef %12)
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.118)
  %15 = load i32, ptr %1, align 4, !tbaa !9
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %.pre = load i32, ptr @__const._Z26printSupportedImageFormatsv.orders, align 16, !tbaa !9
  %17 = load ptr, ptr @__const._Z26printSupportedImageFormatsv.orderstr, align 16
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 4), align 4
  %19 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 8), align 8
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 8), align 8
  %21 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 16), align 16
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 12), align 4
  %23 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 24), align 8
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 16), align 16
  %25 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 32), align 16
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 20), align 4
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 40), align 8
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 24), align 8
  %29 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 48), align 16
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 28), align 4
  %31 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 56), align 8
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 32), align 16
  %33 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 64), align 16
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orders, i64 36), align 4
  %35 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.orderstr, i64 72), align 8
  %36 = load i32, ptr @__const._Z26printSupportedImageFormatsv.types, align 16
  %37 = load ptr, ptr @__const._Z26printSupportedImageFormatsv.typesstr, align 16
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 4), align 4
  %39 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 8), align 8
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 8), align 8
  %41 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 16), align 16
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 12), align 4
  %43 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 24), align 8
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 16), align 16
  %45 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 32), align 16
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 20), align 4
  %47 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 40), align 8
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 24), align 8
  %49 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 48), align 16
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 28), align 4
  %51 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 56), align 8
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 32), align 16
  %53 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 64), align 16
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 36), align 4
  %55 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 72), align 8
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 40), align 8
  %57 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 80), align 16
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 44), align 4
  %59 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 88), align 8
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 48), align 16
  %61 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 96), align 16
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 52), align 4
  %63 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 104), align 8
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.types, i64 56), align 8
  %65 = load ptr, ptr getelementptr inbounds (i8, ptr @__const._Z26printSupportedImageFormatsv.typesstr, i64 112), align 16
  br label %.lr.ph

._crit_edge:                                      ; preds = %193, %0
  call void @free(ptr noundef %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader, %193
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %193 ]
  %66 = trunc nuw nsw i64 %indvars.iv to i32
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.119, i32 noundef %66)
  %68 = getelementptr inbounds %struct._cl_image_format, ptr %8, i64 %indvars.iv
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %70 = icmp eq i32 %69, %.pre
  br i1 %70, label %71, label %73

71:                                               ; preds = %.lr.ph
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %17)
  %.pre25 = load i32, ptr %68, align 4, !tbaa !11
  br label %73

73:                                               ; preds = %.lr.ph, %71
  %74 = phi i32 [ %69, %.lr.ph ], [ %.pre25, %71 ]
  %75 = icmp eq i32 %74, %18
  br i1 %75, label %76, label %78

76:                                               ; preds = %73
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %19)
  %.pre26 = load i32, ptr %68, align 4, !tbaa !11
  br label %78

78:                                               ; preds = %76, %73
  %79 = phi i32 [ %.pre26, %76 ], [ %74, %73 ]
  %80 = icmp eq i32 %79, %20
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %21)
  %.pre27 = load i32, ptr %68, align 4, !tbaa !11
  br label %83

83:                                               ; preds = %81, %78
  %84 = phi i32 [ %.pre27, %81 ], [ %79, %78 ]
  %85 = icmp eq i32 %84, %22
  br i1 %85, label %86, label %88

86:                                               ; preds = %83
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %23)
  %.pre28 = load i32, ptr %68, align 4, !tbaa !11
  br label %88

88:                                               ; preds = %86, %83
  %89 = phi i32 [ %.pre28, %86 ], [ %84, %83 ]
  %90 = icmp eq i32 %89, %24
  br i1 %90, label %91, label %93

91:                                               ; preds = %88
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %25)
  %.pre29 = load i32, ptr %68, align 4, !tbaa !11
  br label %93

93:                                               ; preds = %91, %88
  %94 = phi i32 [ %.pre29, %91 ], [ %89, %88 ]
  %95 = icmp eq i32 %94, %26
  br i1 %95, label %96, label %98

96:                                               ; preds = %93
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %27)
  %.pre30 = load i32, ptr %68, align 4, !tbaa !11
  br label %98

98:                                               ; preds = %96, %93
  %99 = phi i32 [ %.pre30, %96 ], [ %94, %93 ]
  %100 = icmp eq i32 %99, %28
  br i1 %100, label %101, label %103

101:                                              ; preds = %98
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %29)
  %.pre31 = load i32, ptr %68, align 4, !tbaa !11
  br label %103

103:                                              ; preds = %101, %98
  %104 = phi i32 [ %.pre31, %101 ], [ %99, %98 ]
  %105 = icmp eq i32 %104, %30
  br i1 %105, label %106, label %108

106:                                              ; preds = %103
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %31)
  %.pre32 = load i32, ptr %68, align 4, !tbaa !11
  br label %108

108:                                              ; preds = %106, %103
  %109 = phi i32 [ %.pre32, %106 ], [ %104, %103 ]
  %110 = icmp eq i32 %109, %32
  br i1 %110, label %111, label %113

111:                                              ; preds = %108
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %33)
  %.pre33 = load i32, ptr %68, align 4, !tbaa !11
  br label %113

113:                                              ; preds = %111, %108
  %114 = phi i32 [ %.pre33, %111 ], [ %109, %108 ]
  %115 = icmp eq i32 %114, %34
  br i1 %115, label %116, label %.preheader

116:                                              ; preds = %113
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %35)
  br label %.preheader

.preheader:                                       ; preds = %116, %113
  %118 = getelementptr inbounds %struct._cl_image_format, ptr %8, i64 %indvars.iv, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !13
  %120 = icmp eq i32 %119, %36
  br i1 %120, label %121, label %123

121:                                              ; preds = %.preheader
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %37)
  %.pre34 = load i32, ptr %118, align 4, !tbaa !13
  br label %123

123:                                              ; preds = %.preheader, %121
  %124 = phi i32 [ %119, %.preheader ], [ %.pre34, %121 ]
  %125 = icmp eq i32 %124, %38
  br i1 %125, label %126, label %128

126:                                              ; preds = %123
  %127 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %39)
  %.pre35 = load i32, ptr %118, align 4, !tbaa !13
  br label %128

128:                                              ; preds = %126, %123
  %129 = phi i32 [ %.pre35, %126 ], [ %124, %123 ]
  %130 = icmp eq i32 %129, %40
  br i1 %130, label %131, label %133

131:                                              ; preds = %128
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %41)
  %.pre36 = load i32, ptr %118, align 4, !tbaa !13
  br label %133

133:                                              ; preds = %131, %128
  %134 = phi i32 [ %.pre36, %131 ], [ %129, %128 ]
  %135 = icmp eq i32 %134, %42
  br i1 %135, label %136, label %138

136:                                              ; preds = %133
  %137 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %43)
  %.pre37 = load i32, ptr %118, align 4, !tbaa !13
  br label %138

138:                                              ; preds = %136, %133
  %139 = phi i32 [ %.pre37, %136 ], [ %134, %133 ]
  %140 = icmp eq i32 %139, %44
  br i1 %140, label %141, label %143

141:                                              ; preds = %138
  %142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %45)
  %.pre38 = load i32, ptr %118, align 4, !tbaa !13
  br label %143

143:                                              ; preds = %141, %138
  %144 = phi i32 [ %.pre38, %141 ], [ %139, %138 ]
  %145 = icmp eq i32 %144, %46
  br i1 %145, label %146, label %148

146:                                              ; preds = %143
  %147 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %47)
  %.pre39 = load i32, ptr %118, align 4, !tbaa !13
  br label %148

148:                                              ; preds = %146, %143
  %149 = phi i32 [ %.pre39, %146 ], [ %144, %143 ]
  %150 = icmp eq i32 %149, %48
  br i1 %150, label %151, label %153

151:                                              ; preds = %148
  %152 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %49)
  %.pre40 = load i32, ptr %118, align 4, !tbaa !13
  br label %153

153:                                              ; preds = %151, %148
  %154 = phi i32 [ %.pre40, %151 ], [ %149, %148 ]
  %155 = icmp eq i32 %154, %50
  br i1 %155, label %156, label %158

156:                                              ; preds = %153
  %157 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %51)
  %.pre41 = load i32, ptr %118, align 4, !tbaa !13
  br label %158

158:                                              ; preds = %156, %153
  %159 = phi i32 [ %.pre41, %156 ], [ %154, %153 ]
  %160 = icmp eq i32 %159, %52
  br i1 %160, label %161, label %163

161:                                              ; preds = %158
  %162 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %53)
  %.pre42 = load i32, ptr %118, align 4, !tbaa !13
  br label %163

163:                                              ; preds = %161, %158
  %164 = phi i32 [ %.pre42, %161 ], [ %159, %158 ]
  %165 = icmp eq i32 %164, %54
  br i1 %165, label %166, label %168

166:                                              ; preds = %163
  %167 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %55)
  %.pre43 = load i32, ptr %118, align 4, !tbaa !13
  br label %168

168:                                              ; preds = %166, %163
  %169 = phi i32 [ %.pre43, %166 ], [ %164, %163 ]
  %170 = icmp eq i32 %169, %56
  br i1 %170, label %171, label %173

171:                                              ; preds = %168
  %172 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %57)
  %.pre44 = load i32, ptr %118, align 4, !tbaa !13
  br label %173

173:                                              ; preds = %171, %168
  %174 = phi i32 [ %.pre44, %171 ], [ %169, %168 ]
  %175 = icmp eq i32 %174, %58
  br i1 %175, label %176, label %178

176:                                              ; preds = %173
  %177 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %59)
  %.pre45 = load i32, ptr %118, align 4, !tbaa !13
  br label %178

178:                                              ; preds = %176, %173
  %179 = phi i32 [ %.pre45, %176 ], [ %174, %173 ]
  %180 = icmp eq i32 %179, %60
  br i1 %180, label %181, label %183

181:                                              ; preds = %178
  %182 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %61)
  %.pre46 = load i32, ptr %118, align 4, !tbaa !13
  br label %183

183:                                              ; preds = %181, %178
  %184 = phi i32 [ %.pre46, %181 ], [ %179, %178 ]
  %185 = icmp eq i32 %184, %62
  br i1 %185, label %186, label %188

186:                                              ; preds = %183
  %187 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %63)
  %.pre47 = load i32, ptr %118, align 4, !tbaa !13
  br label %188

188:                                              ; preds = %186, %183
  %189 = phi i32 [ %.pre47, %186 ], [ %184, %183 ]
  %190 = icmp eq i32 %189, %64
  br i1 %190, label %191, label %193

191:                                              ; preds = %188
  %192 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, ptr noundef %65)
  br label %193

193:                                              ; preds = %191, %188
  %194 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.121)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %195 = load i32, ptr %1, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = icmp slt i64 %indvars.iv.next, %196
  br i1 %197, label %.lr.ph, label %._crit_edge, !llvm.loop !14
}

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

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

!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, !10, i64 0}
!12 = !{!"_ZTS16_cl_image_format", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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