; LLVM IR from kazulagi/plantFEM :: src/SparseClass (crs_opencl_func)

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

@__const.opencl_crs_matvec.fileName = external hidden unnamed_addr constant [18 x i8], align 16
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @opencl_crs_matvec(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca [18 x i8], align 16
  %31 = alloca ptr, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca [2048 x i8], align 16
  store i32 %0, ptr %8, align 4, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = zext i32 %35 to i64
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = zext i32 %37 to i64
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = zext i32 %39 to i64
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = zext i32 %41 to i64
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = zext i32 %43 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr null, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store ptr null, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr null, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr null, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr null, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store ptr null, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store ptr null, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store ptr null, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store ptr null, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store ptr null, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 18, ptr %30) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 @__const.opencl_crs_matvec.fileName, i64 18, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %45 = getelementptr inbounds [18 x i8], ptr %30, i64 0, i64 0
  %46 = call noalias ptr @fopen(ptr noundef %45, ptr noundef @.str)
  store ptr %46, ptr %29, align 8, !tbaa !9
  %47 = load ptr, ptr %29, align 8, !tbaa !9
  %48 = icmp ne ptr %47, null
  br i1 %48, label %52, label %49

49:                                               ; preds = %7
  %50 = load ptr, ptr @stderr, align 8, !tbaa !9
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.1) #7
  call void @exit(i32 noundef 1) #8
  unreachable

52:                                               ; preds = %7
  %53 = call noalias ptr @malloc(i64 noundef 1048576) #9
  store ptr %53, ptr %31, align 8, !tbaa !9
  %54 = load ptr, ptr %31, align 8, !tbaa !9
  %55 = load ptr, ptr %29, align 8, !tbaa !9
  %56 = call i64 @fread(ptr noundef %54, i64 noundef 1, i64 noundef 1048576, ptr noundef %55)
  store i64 %56, ptr %32, align 8, !tbaa !11
  %57 = load ptr, ptr %29, align 8, !tbaa !9
  %58 = call i32 @fclose(ptr noundef %57)
  %59 = call i32 @clGetPlatformIDs(i32 noundef 1, ptr noundef %25, ptr noundef %27)
  store i32 %59, ptr %28, align 4, !tbaa !5
  %60 = load ptr, ptr %25, align 8, !tbaa !9
  %61 = call i32 @clGetDeviceIDs(ptr noundef %60, i64 noundef 1, i32 noundef 1, ptr noundef %15, ptr noundef %26)
  store i32 %61, ptr %28, align 4, !tbaa !5
  %62 = call ptr @clCreateContext(ptr noundef null, i32 noundef 1, ptr noundef %15, ptr noundef null, ptr noundef null, ptr noundef %28)
  store ptr %62, ptr %16, align 8, !tbaa !9
  %63 = load i32, ptr %28, align 4, !tbaa !5
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %52
  %66 = load i32, ptr %28, align 4, !tbaa !5
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %66)
  call void @exit(i32 noundef 1) #8
  unreachable

68:                                               ; preds = %52
  %69 = load ptr, ptr %16, align 8, !tbaa !9
  %70 = load ptr, ptr %15, align 8, !tbaa !9
  %71 = call ptr @clCreateCommandQueue(ptr noundef %69, ptr noundef %70, i64 noundef 0, ptr noundef %28)
  store ptr %71, ptr %17, align 8, !tbaa !9
  %72 = load i32, ptr %28, align 4, !tbaa !5
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %77

74:                                               ; preds = %68
  %75 = load i32, ptr %28, align 4, !tbaa !5
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %75)
  call void @exit(i32 noundef 1) #8
  unreachable

77:                                               ; preds = %68
  %78 = load ptr, ptr %16, align 8, !tbaa !9
  %79 = load i32, ptr %8, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = mul i64 %80, 4
  %82 = load ptr, ptr %10, align 8, !tbaa !9
  %83 = call ptr @clCreateBuffer(ptr noundef %78, i64 noundef 32, i64 noundef %81, ptr noundef %82, ptr noundef %28)
  store ptr %83, ptr %18, align 8, !tbaa !9
  %84 = load ptr, ptr %16, align 8, !tbaa !9
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = mul i64 %86, 4
  %88 = load ptr, ptr %11, align 8, !tbaa !9
  %89 = call ptr @clCreateBuffer(ptr noundef %84, i64 noundef 32, i64 noundef %87, ptr noundef %88, ptr noundef %28)
  store ptr %89, ptr %19, align 8, !tbaa !9
  %90 = load ptr, ptr %16, align 8, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = mul i64 %92, 8
  %94 = load ptr, ptr %12, align 8, !tbaa !9
  %95 = call ptr @clCreateBuffer(ptr noundef %90, i64 noundef 32, i64 noundef %93, ptr noundef %94, ptr noundef %28)
  store ptr %95, ptr %20, align 8, !tbaa !9
  %96 = load ptr, ptr %16, align 8, !tbaa !9
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = mul i64 %98, 8
  %100 = load ptr, ptr %13, align 8, !tbaa !9
  %101 = call ptr @clCreateBuffer(ptr noundef %96, i64 noundef 32, i64 noundef %99, ptr noundef %100, ptr noundef %28)
  store ptr %101, ptr %21, align 8, !tbaa !9
  %102 = load ptr, ptr %16, align 8, !tbaa !9
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = mul i64 %104, 8
  %106 = load ptr, ptr %14, align 8, !tbaa !9
  %107 = call ptr @clCreateBuffer(ptr noundef %102, i64 noundef 32, i64 noundef %105, ptr noundef %106, ptr noundef %28)
  store ptr %107, ptr %22, align 8, !tbaa !9
  %108 = load i32, ptr %28, align 4, !tbaa !5
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %113

110:                                              ; preds = %77
  %111 = load i32, ptr %28, align 4, !tbaa !5
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %111)
  call void @exit(i32 noundef 1) #8
  unreachable

113:                                              ; preds = %77
  %114 = load ptr, ptr %16, align 8, !tbaa !9
  %115 = call ptr @clCreateProgramWithSource(ptr noundef %114, i32 noundef 1, ptr noundef %31, ptr noundef %32, ptr noundef %28)
  store ptr %115, ptr %23, align 8, !tbaa !9
  %116 = load i32, ptr %28, align 4, !tbaa !5
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %121

118:                                              ; preds = %113
  %119 = load i32, ptr %28, align 4, !tbaa !5
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %119)
  call void @exit(i32 noundef 1) #8
  unreachable

121:                                              ; preds = %113
  %122 = load ptr, ptr %23, align 8, !tbaa !9
  %123 = call i32 @clBuildProgram(ptr noundef %122, i32 noundef 1, ptr noundef %15, ptr noundef null, ptr noundef null, ptr noundef null)
  store i32 %123, ptr %28, align 4, !tbaa !5
  %124 = load i32, ptr %28, align 4, !tbaa !5
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %134

126:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 2048, ptr %34) #7
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %128 = load ptr, ptr %23, align 8, !tbaa !9
  %129 = load ptr, ptr %15, align 8, !tbaa !9
  %130 = getelementptr inbounds [2048 x i8], ptr %34, i64 0, i64 0
  %131 = call i32 @clGetProgramBuildInfo(ptr noundef %128, ptr noundef %129, i32 noundef 4483, i64 noundef 2048, ptr noundef %130, ptr noundef %33)
  %132 = getelementptr inbounds [2048 x i8], ptr %34, i64 0, i64 0
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef %132)
  call void @exit(i32 noundef 1) #8
  unreachable

134:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 18, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  ret void
}

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

; 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) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #6

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare i32 @fclose(ptr noundef) #3

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

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

declare ptr @clCreateContext(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

declare ptr @clCreateCommandQueue(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #3

declare ptr @clCreateBuffer(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #3

declare ptr @clCreateProgramWithSource(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @clBuildProgram(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @clGetProgramBuildInfo(ptr noundef, ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) #3

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

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


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

@__const.opencl_crs_matvec.fileName = external hidden unnamed_addr constant [18 x i8], align 16
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @opencl_crs_matvec(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca [2048 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %17 = tail call noalias ptr @fopen(ptr noundef nonnull @__const.opencl_crs_matvec.fileName, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %18, label %21

18:                                               ; preds = %7
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.1) #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

21:                                               ; preds = %7
  %22 = tail call noalias dereferenceable_or_null(1048576) ptr @malloc(i64 noundef 1048576) #9
  store ptr %22, ptr %13, align 8, !tbaa !5
  %23 = tail call i64 @fread(ptr noundef %22, i64 noundef 1, i64 noundef 1048576, ptr noundef nonnull %17)
  store i64 %23, ptr %14, align 8, !tbaa !9
  %24 = tail call i32 @fclose(ptr noundef nonnull %17)
  %25 = call i32 @clGetPlatformIDs(i32 noundef 1, ptr noundef nonnull %9, ptr noundef nonnull %11) #6
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = call i32 @clGetDeviceIDs(ptr noundef %26, i64 noundef 1, i32 noundef 1, ptr noundef nonnull %8, ptr noundef nonnull %10) #6
  store i32 %27, ptr %12, align 4, !tbaa !11
  %28 = call ptr @clCreateContext(ptr noundef null, i32 noundef 1, ptr noundef nonnull %8, ptr noundef null, ptr noundef null, ptr noundef nonnull %12) #6
  %29 = load i32, ptr %12, align 4, !tbaa !11
  %.not30 = icmp eq i32 %29, 0
  br i1 %.not30, label %32, label %30

30:                                               ; preds = %21
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %29)
  call void @exit(i32 noundef 1) #8
  unreachable

32:                                               ; preds = %21
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call ptr @clCreateCommandQueue(ptr noundef %28, ptr noundef %33, i64 noundef 0, ptr noundef nonnull %12) #6
  %35 = load i32, ptr %12, align 4, !tbaa !11
  %.not31 = icmp eq i32 %35, 0
  br i1 %.not31, label %38, label %36

36:                                               ; preds = %32
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %35)
  call void @exit(i32 noundef 1) #8
  unreachable

38:                                               ; preds = %32
  %39 = sext i32 %0 to i64
  %40 = shl nsw i64 %39, 2
  %41 = call ptr @clCreateBuffer(ptr noundef %28, i64 noundef 32, i64 noundef %40, ptr noundef %2, ptr noundef nonnull %12) #6
  %42 = sext i32 %1 to i64
  %43 = shl nsw i64 %42, 2
  %44 = call ptr @clCreateBuffer(ptr noundef %28, i64 noundef 32, i64 noundef %43, ptr noundef %3, ptr noundef nonnull %12) #6
  %45 = shl nsw i64 %42, 3
  %46 = call ptr @clCreateBuffer(ptr noundef %28, i64 noundef 32, i64 noundef %45, ptr noundef %4, ptr noundef nonnull %12) #6
  %47 = shl nsw i64 %39, 3
  %48 = call ptr @clCreateBuffer(ptr noundef %28, i64 noundef 32, i64 noundef %47, ptr noundef %5, ptr noundef nonnull %12) #6
  %49 = call ptr @clCreateBuffer(ptr noundef %28, i64 noundef 32, i64 noundef %47, ptr noundef %6, ptr noundef nonnull %12) #6
  %50 = load i32, ptr %12, align 4, !tbaa !11
  %.not32 = icmp eq i32 %50, 0
  br i1 %.not32, label %53, label %51

51:                                               ; preds = %38
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %50)
  call void @exit(i32 noundef 1) #8
  unreachable

53:                                               ; preds = %38
  %54 = call ptr @clCreateProgramWithSource(ptr noundef %28, i32 noundef 1, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %12) #6
  %55 = load i32, ptr %12, align 4, !tbaa !11
  %.not33 = icmp eq i32 %55, 0
  br i1 %.not33, label %58, label %56

56:                                               ; preds = %53
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %55)
  call void @exit(i32 noundef 1) #8
  unreachable

58:                                               ; preds = %53
  %59 = call i32 @clBuildProgram(ptr noundef %54, i32 noundef 1, ptr noundef nonnull %8, ptr noundef null, ptr noundef null, ptr noundef null) #6
  store i32 %59, ptr %12, align 4, !tbaa !11
  %.not34 = icmp eq i32 %59, 0
  br i1 %.not34, label %65, label %60

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %16) #6
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = call i32 @clGetProgramBuildInfo(ptr noundef %54, ptr noundef %62, i32 noundef 4483, i64 noundef 2048, ptr noundef nonnull %16, ptr noundef nonnull %15) #6
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull %16)
  call void @exit(i32 noundef 1) #8
  unreachable

65:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  ret void
}

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

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

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

declare ptr @clCreateContext(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

declare ptr @clCreateCommandQueue(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #5

declare ptr @clCreateBuffer(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare ptr @clCreateProgramWithSource(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @clBuildProgram(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @clGetProgramBuildInfo(ptr noundef, ptr noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { noreturn 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 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 #5 = { "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 = { cold nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass