; LLVM IR from kazulagi/plantFEM :: src/OpenCLClass (cOpenCLClass)

; 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.hello.fileName = external hidden unnamed_addr constant [15 x i8], align 1
@.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 [6 x i8], align 1
@__const.hello.globalWorkSize = external hidden unnamed_addr constant [1 x i64], align 8
@__const.hello.localWorkSize = external hidden unnamed_addr constant [1 x i64], align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @hello() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [128 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca [15 x i8], align 1
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca [1 x i64], align 8
  %17 = alloca [1 x i64], align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  store ptr null, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 15, ptr %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %13, ptr align 1 @__const.hello.fileName, i64 15, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %18 = getelementptr inbounds [15 x i8], ptr %13, i64 0, i64 0
  %19 = call noalias ptr @fopen(ptr noundef %18, ptr noundef @.str)
  store ptr %19, ptr %12, align 8, !tbaa !5
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %25, label %22

22:                                               ; preds = %0
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.1) #7
  call void @exit(i32 noundef 1) #8
  unreachable

25:                                               ; preds = %0
  %26 = call noalias ptr @malloc(i64 noundef 1048576) #9
  store ptr %26, ptr %14, align 8, !tbaa !5
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = call i64 @fread(ptr noundef %27, i64 noundef 1, i64 noundef 1048576, ptr noundef %28)
  store i64 %29, ptr %15, align 8, !tbaa !9
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  %31 = call i32 @fclose(ptr noundef %30)
  %32 = call i32 @clGetPlatformIDs(i32 noundef 1, ptr noundef %7, ptr noundef %9)
  store i32 %32, ptr %10, align 4, !tbaa !11
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = call i32 @clGetDeviceIDs(ptr noundef %33, i64 noundef 1, i32 noundef 1, ptr noundef %1, ptr noundef %8)
  store i32 %34, ptr %10, align 4, !tbaa !11
  %35 = call ptr @clCreateContext(ptr noundef null, i32 noundef 1, ptr noundef %1, ptr noundef null, ptr noundef null, ptr noundef %10)
  store ptr %35, ptr %2, align 8, !tbaa !5
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = load ptr, ptr %1, align 8, !tbaa !5
  %38 = call ptr @clCreateCommandQueueWithProperties(ptr noundef %36, ptr noundef %37, ptr noundef null, ptr noundef %10)
  store ptr %38, ptr %3, align 8, !tbaa !5
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = call ptr @clCreateBuffer(ptr noundef %39, i64 noundef 1, i64 noundef 128, ptr noundef null, ptr noundef %10)
  store ptr %40, ptr %4, align 8, !tbaa !5
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = call ptr @clCreateProgramWithSource(ptr noundef %41, i32 noundef 1, ptr noundef %14, ptr noundef %15, ptr noundef %10)
  store ptr %42, ptr %5, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call i32 @clBuildProgram(ptr noundef %43, i32 noundef 1, ptr noundef %1, ptr noundef null, ptr noundef null, ptr noundef null)
  store i32 %44, ptr %10, align 4, !tbaa !11
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call ptr @clCreateKernel(ptr noundef %45, ptr noundef @.str.2, ptr noundef %10)
  store ptr %46, ptr %6, align 8, !tbaa !5
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call i32 @clSetKernelArg(ptr noundef %47, i32 noundef 0, i64 noundef 8, ptr noundef %4)
  store i32 %48, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 @__const.hello.globalWorkSize, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 @__const.hello.localWorkSize, i64 8, i1 false)
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds [1 x i64], ptr %16, i64 0, i64 0
  %52 = getelementptr inbounds [1 x i64], ptr %17, i64 0, i64 0
  %53 = call i32 @clEnqueueNDRangeKernel(ptr noundef %49, ptr noundef %50, i32 noundef 1, ptr noundef null, ptr noundef %51, ptr noundef %52, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %53, ptr %10, align 4, !tbaa !11
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  %57 = call i32 @clEnqueueReadBuffer(ptr noundef %54, ptr noundef %55, i32 noundef 1, i64 noundef 0, i64 noundef 128, ptr noundef %56, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %57, ptr %10, align 4, !tbaa !11
  %58 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  %59 = call i32 @puts(ptr noundef %58)
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = call i32 @clFlush(ptr noundef %60)
  store i32 %61, ptr %10, align 4, !tbaa !11
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = call i32 @clFinish(ptr noundef %62)
  store i32 %63, ptr %10, align 4, !tbaa !11
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call i32 @clReleaseKernel(ptr noundef %64)
  store i32 %65, ptr %10, align 4, !tbaa !11
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = call i32 @clReleaseProgram(ptr noundef %66)
  store i32 %67, ptr %10, align 4, !tbaa !11
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = call i32 @clReleaseMemObject(ptr noundef %68)
  store i32 %69, ptr %10, align 4, !tbaa !11
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = call i32 @clReleaseCommandQueue(ptr noundef %70)
  store i32 %71, ptr %10, align 4, !tbaa !11
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = call i32 @clReleaseContext(ptr noundef %72)
  store i32 %73, ptr %10, align 4, !tbaa !11
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %74) #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
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 15, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  ret i32 0
}

; 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 ptr @clCreateCommandQueueWithProperties(ptr noundef, ptr noundef, ptr 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 ptr @clCreateKernel(ptr noundef, ptr noundef, ptr noundef) #3

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

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

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

declare i32 @puts(ptr noundef) #3

declare i32 @clFlush(ptr noundef) #3

declare i32 @clFinish(ptr noundef) #3

declare i32 @clReleaseKernel(ptr noundef) #3

declare i32 @clReleaseProgram(ptr noundef) #3

declare i32 @clReleaseMemObject(ptr noundef) #3

declare i32 @clReleaseCommandQueue(ptr noundef) #3

declare i32 @clReleaseContext(ptr noundef) #3

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

; 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 = !{!"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}


; 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.hello.fileName = external hidden unnamed_addr constant [15 x i8], align 1
@.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 [6 x i8], align 1
@__const.hello.globalWorkSize = external hidden unnamed_addr constant [1 x i64], align 8
@__const.hello.localWorkSize = external hidden unnamed_addr constant [1 x i64], align 8

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

13:                                               ; preds = %0
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.1) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

16:                                               ; preds = %0
  %17 = tail call noalias dereferenceable_or_null(1048576) ptr @malloc(i64 noundef 1048576) #10
  store ptr %17, ptr %8, align 8, !tbaa !5
  %18 = tail call i64 @fread(ptr noundef %17, i64 noundef 1, i64 noundef 1048576, ptr noundef nonnull %12)
  store i64 %18, ptr %9, align 8, !tbaa !9
  %19 = tail call i32 @fclose(ptr noundef nonnull %12)
  %20 = call i32 @clGetPlatformIDs(i32 noundef 1, ptr noundef nonnull %3, ptr noundef nonnull %5) #7
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = call i32 @clGetDeviceIDs(ptr noundef %21, i64 noundef 1, i32 noundef 1, ptr noundef nonnull %1, ptr noundef nonnull %4) #7
  store i32 %22, ptr %6, align 4, !tbaa !11
  %23 = call ptr @clCreateContext(ptr noundef null, i32 noundef 1, ptr noundef nonnull %1, ptr noundef null, ptr noundef null, ptr noundef nonnull %6) #7
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = call ptr @clCreateCommandQueueWithProperties(ptr noundef %23, ptr noundef %24, ptr noundef null, ptr noundef nonnull %6) #7
  %26 = call ptr @clCreateBuffer(ptr noundef %23, i64 noundef 1, i64 noundef 128, ptr noundef null, ptr noundef nonnull %6) #7
  store ptr %26, ptr %2, align 8, !tbaa !5
  %27 = call ptr @clCreateProgramWithSource(ptr noundef %23, i32 noundef 1, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %6) #7
  %28 = call i32 @clBuildProgram(ptr noundef %27, i32 noundef 1, ptr noundef nonnull %1, ptr noundef null, ptr noundef null, ptr noundef null) #7
  store i32 %28, ptr %6, align 4, !tbaa !11
  %29 = call ptr @clCreateKernel(ptr noundef %27, ptr noundef nonnull @.str.2, ptr noundef nonnull %6) #7
  %30 = call i32 @clSetKernelArg(ptr noundef %29, i32 noundef 0, i64 noundef 8, ptr noundef nonnull %2) #7
  store i32 %30, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %31 = load i64, ptr @__const.hello.globalWorkSize, align 8
  store i64 %31, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %32 = load i64, ptr @__const.hello.localWorkSize, align 8
  store i64 %32, ptr %11, align 8
  %33 = call i32 @clEnqueueNDRangeKernel(ptr noundef %25, ptr noundef %29, i32 noundef 1, ptr noundef null, ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef 0, ptr noundef null, ptr noundef null) #7
  store i32 %33, ptr %6, align 4, !tbaa !11
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  %35 = call i32 @clEnqueueReadBuffer(ptr noundef %25, ptr noundef %34, i32 noundef 1, i64 noundef 0, i64 noundef 128, ptr noundef nonnull %7, i32 noundef 0, ptr noundef null, ptr noundef null) #7
  store i32 %35, ptr %6, align 4, !tbaa !11
  %36 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %7)
  %37 = call i32 @clFlush(ptr noundef %25) #7
  store i32 %37, ptr %6, align 4, !tbaa !11
  %38 = call i32 @clFinish(ptr noundef %25) #7
  store i32 %38, ptr %6, align 4, !tbaa !11
  %39 = call i32 @clReleaseKernel(ptr noundef %29) #7
  store i32 %39, ptr %6, align 4, !tbaa !11
  %40 = call i32 @clReleaseProgram(ptr noundef %27) #7
  store i32 %40, ptr %6, align 4, !tbaa !11
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = call i32 @clReleaseMemObject(ptr noundef %41) #7
  store i32 %42, ptr %6, align 4, !tbaa !11
  %43 = call i32 @clReleaseCommandQueue(ptr noundef %25) #7
  store i32 %43, ptr %6, align 4, !tbaa !11
  %44 = call i32 @clReleaseContext(ptr noundef %23) #7
  store i32 %44, ptr %6, align 4, !tbaa !11
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 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: 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

declare ptr @clCreateCommandQueueWithProperties(ptr noundef, ptr noundef, ptr 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 ptr @clCreateKernel(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

declare i32 @clFlush(ptr noundef) local_unnamed_addr #5

declare i32 @clFinish(ptr noundef) local_unnamed_addr #5

declare i32 @clReleaseKernel(ptr noundef) local_unnamed_addr #5

declare i32 @clReleaseProgram(ptr noundef) local_unnamed_addr #5

declare i32 @clReleaseMemObject(ptr noundef) local_unnamed_addr #5

declare i32 @clReleaseCommandQueue(ptr noundef) local_unnamed_addr #5

declare i32 @clReleaseContext(ptr noundef) local_unnamed_addr #5

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

; 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 = { 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass