; LLVM IR from bjourne/fast_snn_fpga :: src (opencl)

; 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.66 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__.ocl_load_kernels = external hidden unnamed_addr constant [122 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @err_str(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @ocl_check_err(i32 noundef, ptr noundef, i32 noundef) #0

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ocl_load_kernels(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #0 {
  %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 i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i64, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i64 %4, ptr %14, align 8, !tbaa !9
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  %26 = call zeroext i1 @files_read(ptr noundef %25, ptr noundef %18, ptr noundef %19)
  br i1 %26, label %28, label %27

27:                                               ; preds = %8
  store i32 1, ptr %9, align 4
  store i32 1, ptr %20, align 4
  br label %108

28:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  %30 = call ptr @paths_ext(ptr noundef %29)
  %31 = call i32 @strcmp(ptr noundef %30, ptr noundef @.str.92) #8
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %37, label %33

33:                                               ; preds = %28
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call ptr @clCreateProgramWithSource(ptr noundef %34, i32 noundef 1, ptr noundef %18, ptr noundef %19, ptr noundef %21)
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %35, ptr %36, align 8, !tbaa !5
  br label %41

37:                                               ; preds = %28
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = call ptr @clCreateProgramWithBinary(ptr noundef %38, i32 noundef 1, ptr noundef %11, ptr noundef %19, ptr noundef %18, ptr noundef %21, ptr noundef null)
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %39, ptr %40, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %37, %33
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %42) #7
  %43 = load i32, ptr %21, align 4, !tbaa !11
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %41
  %46 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %46, ptr %9, align 4
  store i32 1, ptr %20, align 4
  br label %107

47:                                               ; preds = %41
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = call i32 @clBuildProgram(ptr noundef %49, i32 noundef 1, ptr noundef %11, ptr noundef %50, ptr noundef null, ptr noundef null)
  store i32 %51, ptr %21, align 4, !tbaa !11
  %52 = load i32, ptr %21, align 4, !tbaa !11
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %79

54:                                               ; preds = %47
  %55 = load i32, ptr %21, align 4, !tbaa !11
  %56 = call ptr @err_str(i32 noundef %55)
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.93, ptr noundef %56)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = call i32 @clGetProgramBuildInfo(ptr noundef %59, ptr noundef %60, i32 noundef 4483, i64 noundef 0, ptr noundef null, ptr noundef %22)
  call void @ocl_check_err(i32 noundef %61, ptr noundef @.str.66, i32 noundef 316)
  %62 = load i64, ptr %22, align 8, !tbaa !9
  %63 = icmp ugt i64 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %54
  br label %66

65:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.94, ptr noundef @.str.66, i32 noundef 317, ptr noundef @__PRETTY_FUNCTION__.ocl_load_kernels) #9
  unreachable

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %67 = load i64, ptr %22, align 8, !tbaa !9
  %68 = call noalias ptr @malloc(i64 noundef %67) #10
  store ptr %68, ptr %23, align 8, !tbaa !5
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = load i64, ptr %22, align 8, !tbaa !9
  %73 = load ptr, ptr %23, align 8, !tbaa !5
  %74 = call i32 @clGetProgramBuildInfo(ptr noundef %70, ptr noundef %71, i32 noundef 4483, i64 noundef %72, ptr noundef %73, ptr noundef null)
  %75 = load ptr, ptr %23, align 8, !tbaa !5
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str.95, ptr noundef %75)
  %77 = load ptr, ptr %23, align 8, !tbaa !5
  call void @free(ptr noundef %77) #7
  %78 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %78, ptr %9, align 4
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %107

79:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %101, %79
  %81 = load i64, ptr %24, align 8, !tbaa !9
  %82 = load i64, ptr %14, align 8, !tbaa !9
  %83 = icmp ult i64 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  store i32 2, ptr %20, align 4
  br label %104

85:                                               ; preds = %80
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = load i64, ptr %24, align 8, !tbaa !9
  %90 = getelementptr inbounds ptr, ptr %88, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = call ptr @clCreateKernel(ptr noundef %87, ptr noundef %91, ptr noundef %21)
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = load i64, ptr %24, align 8, !tbaa !9
  %95 = getelementptr inbounds ptr, ptr %93, i64 %94
  store ptr %92, ptr %95, align 8, !tbaa !5
  %96 = load i32, ptr %21, align 4, !tbaa !11
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %85
  %99 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %99, ptr %9, align 4
  store i32 1, ptr %20, align 4
  br label %104

100:                                              ; preds = %85
  br label %101

101:                                              ; preds = %100
  %102 = load i64, ptr %24, align 8, !tbaa !9
  %103 = add i64 %102, 1
  store i64 %103, ptr %24, align 8, !tbaa !9
  br label %80, !llvm.loop !13

104:                                              ; preds = %98, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  %105 = load i32, ptr %20, align 4
  switch i32 %105, label %107 [
    i32 2, label %106
  ]

106:                                              ; preds = %104
  store i32 0, ptr %9, align 4
  store i32 1, ptr %20, align 4
  br label %107

107:                                              ; preds = %106, %104, %66, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %108

108:                                              ; preds = %107, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %109 = load i32, ptr %9, align 4
  ret i32 %109
}

declare zeroext i1 @files_read(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @paths_ext(ptr noundef) #2

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

declare ptr @clCreateKernel(ptr noundef, ptr noundef, ptr noundef) #2

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 = { "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 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 #4 = { nounwind willreturn memory(read) "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 "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 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
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}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.66 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__.ocl_load_kernels = external hidden unnamed_addr constant [122 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @err_str(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @ocl_check_err(i32 noundef, ptr noundef, i32 noundef) 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ocl_load_kernels(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef %6, ptr nocapture noundef writeonly %7) local_unnamed_addr #0 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  store ptr %1, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %14 = call zeroext i1 @files_read(ptr noundef %2, ptr noundef nonnull %10, ptr noundef nonnull %11) #8
  br i1 %14, label %15, label %51

15:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %16 = call ptr @paths_ext(ptr noundef %2) #8
  %17 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.92) #9
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %18, label %20

18:                                               ; preds = %15
  %19 = call ptr @clCreateProgramWithSource(ptr noundef %0, i32 noundef 1, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12) #8
  br label %22

20:                                               ; preds = %15
  %21 = call ptr @clCreateProgramWithBinary(ptr noundef %0, i32 noundef 1, ptr noundef nonnull %9, ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef null) #8
  br label %22

22:                                               ; preds = %20, %18
  %storemerge = phi ptr [ %19, %18 ], [ %21, %20 ]
  store ptr %storemerge, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %23) #8
  %24 = load i32, ptr %12, align 4, !tbaa !9
  %.not28 = icmp eq i32 %24, 0
  br i1 %.not28, label %25, label %.loopexit

25:                                               ; preds = %22
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call i32 @clBuildProgram(ptr noundef %26, i32 noundef 1, ptr noundef nonnull %9, ptr noundef %3, ptr noundef null, ptr noundef null) #8
  store i32 %27, ptr %12, align 4, !tbaa !9
  %.not29 = icmp eq i32 %27, 0
  br i1 %.not29, label %.preheader, label %28

.preheader:                                       ; preds = %25
  %.not3133.not = icmp eq i64 %4, 0
  br i1 %.not3133.not, label %.loopexit, label %.lr.ph

28:                                               ; preds = %25
  %29 = call ptr @err_str(i32 noundef %27)
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.93, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call i32 @clGetProgramBuildInfo(ptr noundef %31, ptr noundef %32, i32 noundef 4483, i64 noundef 0, ptr noundef null, ptr noundef nonnull %13) #8
  call void @ocl_check_err(i32 noundef %33, ptr noundef nonnull @.str.66, i32 noundef 316)
  %34 = load i64, ptr %13, align 8, !tbaa !11
  %.not32 = icmp eq i64 %34, 0
  br i1 %.not32, label %35, label %36

35:                                               ; preds = %28
  call void @__assert_fail(ptr noundef nonnull @.str.94, ptr noundef nonnull @.str.66, i32 noundef 317, ptr noundef nonnull @__PRETTY_FUNCTION__.ocl_load_kernels) #10
  unreachable

36:                                               ; preds = %28
  %37 = call noalias ptr @malloc(i64 noundef %34) #11
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = call i32 @clGetProgramBuildInfo(ptr noundef %38, ptr noundef %39, i32 noundef 4483, i64 noundef %34, ptr noundef %37, ptr noundef null) #8
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.95, ptr noundef %37)
  call void @free(ptr noundef %37) #8
  %42 = load i32, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %.loopexit

43:                                               ; preds = %.lr.ph
  %44 = add nuw i64 %.034, 1
  %exitcond.not = icmp eq i64 %44, %4
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !13

.lr.ph:                                           ; preds = %.preheader, %43
  %.034 = phi i64 [ %44, %43 ], [ 0, %.preheader ]
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds ptr, ptr %5, i64 %.034
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = call ptr @clCreateKernel(ptr noundef %45, ptr noundef %47, ptr noundef nonnull %12) #8
  %49 = getelementptr inbounds ptr, ptr %7, i64 %.034
  store ptr %48, ptr %49, align 8, !tbaa !5
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %.not30 = icmp eq i32 %50, 0
  br i1 %.not30, label %43, label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %43, %.preheader, %22, %36
  %.1 = phi i32 [ %42, %36 ], [ %24, %22 ], [ 0, %.preheader ], [ %50, %.lr.ph ], [ 0, %43 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br label %51

51:                                               ; preds = %8, %.loopexit
  %.2 = phi i32 [ %.1, %.loopexit ], [ 1, %8 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  ret i32 %.2
}

declare zeroext i1 @files_read(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare ptr @paths_ext(ptr noundef) local_unnamed_addr #6

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

declare ptr @clCreateProgramWithBinary(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

declare ptr @clCreateKernel(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #6 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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