; LLVM IR from ChenyangZhang-cs/iMLBench :: LR/co-run/src (origin)

; 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.sum_t = type { float, float, float, float }
%struct.linear_param_t = type { ptr, i64, i64, i64 }
%struct.result_t = type { float, float, i32, double }

@device = external hidden global ptr, align 8
@err = external hidden global i32, align 4
@context = external hidden global ptr, align 8
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@program = external hidden global ptr, align 8
@queue = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@start = external global i64, align 8
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@end = external global i64, align 8

declare void @perror(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden ptr @error_msg(i32 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @parallelized_regression(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca %struct.sum_t, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.linear_param_t, ptr %15, i32 0, i32 3
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = mul i64 16, %17
  %19 = call noalias ptr @malloc(i64 noundef %18) #9
  store ptr %19, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr @context, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.linear_param_t, ptr %21, i32 0, i32 1
  %23 = load i64, ptr %22, align 8, !tbaa !12
  %24 = mul i64 %23, 8
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call ptr @clCreateBuffer(ptr noundef %20, i64 noundef 548, i64 noundef %24, ptr noundef %25, ptr noundef @err)
  store ptr %26, ptr %8, align 8, !tbaa !5
  %27 = load ptr, ptr @context, align 8, !tbaa !5
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.linear_param_t, ptr %28, i32 0, i32 3
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = mul i64 %30, 16
  %32 = call ptr @clCreateBuffer(ptr noundef %27, i64 noundef 258, i64 noundef %31, ptr noundef null, ptr noundef @err)
  store ptr %32, ptr %9, align 8, !tbaa !5
  %33 = load i32, ptr @err, align 4, !tbaa !13
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %40

35:                                               ; preds = %3
  call void @perror(ptr noundef @.str.3)
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = load i32, ptr @err, align 4, !tbaa !13
  %38 = call ptr @error_msg(i32 noundef %37)
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.1, ptr noundef %38) #8
  call void @exit(i32 noundef 1) #10
  unreachable

40:                                               ; preds = %3
  %41 = load ptr, ptr @program, align 8, !tbaa !5
  %42 = call ptr @clCreateKernel(ptr noundef %41, ptr noundef @.str.4, ptr noundef @err)
  store ptr %42, ptr %10, align 8, !tbaa !5
  %43 = load i32, ptr @err, align 4, !tbaa !13
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %45, label %50

45:                                               ; preds = %40
  call void @perror(ptr noundef @.str.5)
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = load i32, ptr @err, align 4, !tbaa !13
  %48 = call ptr @error_msg(i32 noundef %47)
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.1, ptr noundef %48) #8
  call void @exit(i32 noundef 1) #10
  unreachable

50:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 0, ptr %11, align 8, !tbaa !15
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load ptr, ptr @device, align 8, !tbaa !5
  %53 = call i32 @clGetKernelWorkGroupInfo(ptr noundef %51, ptr noundef %52, i32 noundef 4528, i64 noundef 8, ptr noundef %11, ptr noundef null)
  store i32 %53, ptr @err, align 4, !tbaa !13
  %54 = load i32, ptr @err, align 4, !tbaa !13
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %56, label %61

56:                                               ; preds = %50
  call void @perror(ptr noundef @.str.6)
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = load i32, ptr @err, align 4, !tbaa !13
  %59 = call ptr @error_msg(i32 noundef %58)
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef @.str.1, ptr noundef %59) #8
  call void @exit(i32 noundef 1) #10
  unreachable

61:                                               ; preds = %50
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.linear_param_t, ptr %62, i32 0, i32 2
  %64 = load i64, ptr %63, align 8, !tbaa !16
  %65 = load i64, ptr %11, align 8, !tbaa !15
  %66 = icmp ugt i64 %64, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %61
  call void @perror(ptr noundef @.str.7)
  call void @exit(i32 noundef 1) #10
  unreachable

68:                                               ; preds = %61
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = call i32 @clSetKernelArg(ptr noundef %69, i32 noundef 0, i64 noundef 8, ptr noundef %8)
  store i32 %70, ptr @err, align 4, !tbaa !13
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.linear_param_t, ptr %72, i32 0, i32 2
  %74 = load i64, ptr %73, align 8, !tbaa !16
  %75 = mul i64 %74, 16
  %76 = call i32 @clSetKernelArg(ptr noundef %71, i32 noundef 1, i64 noundef %75, ptr noundef null)
  %77 = load i32, ptr @err, align 4, !tbaa !13
  %78 = or i32 %77, %76
  store i32 %78, ptr @err, align 4, !tbaa !13
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = call i32 @clSetKernelArg(ptr noundef %79, i32 noundef 2, i64 noundef 8, ptr noundef %9)
  %81 = load i32, ptr @err, align 4, !tbaa !13
  %82 = or i32 %81, %80
  store i32 %82, ptr @err, align 4, !tbaa !13
  %83 = load i32, ptr @err, align 4, !tbaa !13
  %84 = icmp slt i32 %83, 0
  br i1 %84, label %85, label %90

85:                                               ; preds = %68
  call void @perror(ptr noundef @.str.8)
  %86 = load ptr, ptr @stderr, align 8, !tbaa !5
  %87 = load i32, ptr @err, align 4, !tbaa !13
  %88 = call ptr @error_msg(i32 noundef %87)
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.1, ptr noundef %88) #8
  call void @exit(i32 noundef 1) #10
  unreachable

90:                                               ; preds = %68
  %91 = call i64 @clock() #8
  store i64 %91, ptr @start, align 8, !tbaa !15
  %92 = load ptr, ptr @queue, align 8, !tbaa !5
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.linear_param_t, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.linear_param_t, ptr %96, i32 0, i32 2
  %98 = call i32 @clEnqueueNDRangeKernel(ptr noundef %92, ptr noundef %93, i32 noundef 1, ptr noundef null, ptr noundef %95, ptr noundef %97, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %98, ptr @err, align 4, !tbaa !13
  %99 = load i32, ptr @err, align 4, !tbaa !13
  %100 = icmp slt i32 %99, 0
  br i1 %100, label %101, label %106

101:                                              ; preds = %90
  call void @perror(ptr noundef @.str.9)
  %102 = load ptr, ptr @stderr, align 8, !tbaa !5
  %103 = load i32, ptr @err, align 4, !tbaa !13
  %104 = call ptr @error_msg(i32 noundef %103)
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.1, ptr noundef %104) #8
  call void @exit(i32 noundef 1) #10
  unreachable

106:                                              ; preds = %90
  %107 = load ptr, ptr @queue, align 8, !tbaa !5
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.linear_param_t, ptr %109, i32 0, i32 3
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = mul i64 16, %111
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = call i32 @clEnqueueReadBuffer(ptr noundef %107, ptr noundef %108, i32 noundef 1, i64 noundef 0, i64 noundef %112, ptr noundef %113, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %114, ptr @err, align 4, !tbaa !13
  %115 = load i32, ptr @err, align 4, !tbaa !13
  %116 = icmp slt i32 %115, 0
  br i1 %116, label %117, label %122

117:                                              ; preds = %106
  call void @perror(ptr noundef @.str.10)
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = load i32, ptr @err, align 4, !tbaa !13
  %120 = call ptr @error_msg(i32 noundef %119)
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str.1, ptr noundef %120) #8
  call void @exit(i32 noundef 1) #10
  unreachable

122:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  call void @llvm.memset.p0.i64(ptr align 4 %12, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %123

123:                                              ; preds = %168, %122
  %124 = load i32, ptr %13, align 4, !tbaa !13
  %125 = sext i32 %124 to i64
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.linear_param_t, ptr %126, i32 0, i32 3
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = icmp ult i64 %125, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %171

131:                                              ; preds = %123
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = load i32, ptr %13, align 4, !tbaa !13
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds %struct.sum_t, ptr %132, i64 %134
  %136 = getelementptr inbounds %struct.sum_t, ptr %135, i32 0, i32 0
  %137 = load float, ptr %136, align 4, !tbaa !17
  %138 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 0
  %139 = load float, ptr %138, align 4, !tbaa !17
  %140 = fadd float %139, %137
  store float %140, ptr %138, align 4, !tbaa !17
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = load i32, ptr %13, align 4, !tbaa !13
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds %struct.sum_t, ptr %141, i64 %143
  %145 = getelementptr inbounds %struct.sum_t, ptr %144, i32 0, i32 1
  %146 = load float, ptr %145, align 4, !tbaa !20
  %147 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 1
  %148 = load float, ptr %147, align 4, !tbaa !20
  %149 = fadd float %148, %146
  store float %149, ptr %147, align 4, !tbaa !20
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = load i32, ptr %13, align 4, !tbaa !13
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.sum_t, ptr %150, i64 %152
  %154 = getelementptr inbounds %struct.sum_t, ptr %153, i32 0, i32 2
  %155 = load float, ptr %154, align 4, !tbaa !21
  %156 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 2
  %157 = load float, ptr %156, align 4, !tbaa !21
  %158 = fadd float %157, %155
  store float %158, ptr %156, align 4, !tbaa !21
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = load i32, ptr %13, align 4, !tbaa !13
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %struct.sum_t, ptr %159, i64 %161
  %163 = getelementptr inbounds %struct.sum_t, ptr %162, i32 0, i32 3
  %164 = load float, ptr %163, align 4, !tbaa !22
  %165 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 3
  %166 = load float, ptr %165, align 4, !tbaa !22
  %167 = fadd float %166, %164
  store float %167, ptr %165, align 4, !tbaa !22
  br label %168

168:                                              ; preds = %131
  %169 = load i32, ptr %13, align 4, !tbaa !13
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %13, align 4, !tbaa !13
  br label %123, !llvm.loop !23

171:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.linear_param_t, ptr %172, i32 0, i32 1
  %174 = load i64, ptr %173, align 8, !tbaa !12
  %175 = uitofp i64 %174 to float
  %176 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 3
  %177 = load float, ptr %176, align 4, !tbaa !22
  %178 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 0
  %179 = load float, ptr %178, align 4, !tbaa !17
  %180 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 0
  %181 = load float, ptr %180, align 4, !tbaa !17
  %182 = fmul float %179, %181
  %183 = fneg float %182
  %184 = call float @llvm.fmuladd.f32(float %175, float %177, float %183)
  %185 = fpext float %184 to double
  store double %185, ptr %14, align 8, !tbaa !25
  %186 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 1
  %187 = load float, ptr %186, align 4, !tbaa !20
  %188 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 3
  %189 = load float, ptr %188, align 4, !tbaa !22
  %190 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 0
  %191 = load float, ptr %190, align 4, !tbaa !17
  %192 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 2
  %193 = load float, ptr %192, align 4, !tbaa !21
  %194 = fmul float %191, %193
  %195 = fneg float %194
  %196 = call float @llvm.fmuladd.f32(float %187, float %189, float %195)
  %197 = fpext float %196 to double
  %198 = load double, ptr %14, align 8, !tbaa !25
  %199 = fdiv double %197, %198
  %200 = fptrunc double %199 to float
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.result_t, ptr %201, i32 0, i32 0
  store float %200, ptr %202, align 8, !tbaa !27
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.linear_param_t, ptr %203, i32 0, i32 1
  %205 = load i64, ptr %204, align 8, !tbaa !12
  %206 = uitofp i64 %205 to float
  %207 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 2
  %208 = load float, ptr %207, align 4, !tbaa !21
  %209 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 0
  %210 = load float, ptr %209, align 4, !tbaa !17
  %211 = getelementptr inbounds %struct.sum_t, ptr %12, i32 0, i32 1
  %212 = load float, ptr %211, align 4, !tbaa !20
  %213 = fmul float %210, %212
  %214 = fneg float %213
  %215 = call float @llvm.fmuladd.f32(float %206, float %208, float %214)
  %216 = fpext float %215 to double
  %217 = load double, ptr %14, align 8, !tbaa !25
  %218 = fdiv double %216, %217
  %219 = fptrunc double %218 to float
  %220 = load ptr, ptr %6, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.result_t, ptr %220, i32 0, i32 1
  store float %219, ptr %221, align 4, !tbaa !29
  %222 = call i64 @clock() #8
  store i64 %222, ptr @end, align 8, !tbaa !15
  %223 = load i64, ptr @end, align 8, !tbaa !15
  %224 = load i64, ptr @start, align 8, !tbaa !15
  %225 = sub nsw i64 %223, %224
  %226 = sitofp i64 %225 to double
  %227 = fdiv double %226, 1.000000e+06
  %228 = fmul double %227, 1.000000e+03
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.result_t, ptr %229, i32 0, i32 3
  store double %228, ptr %230, align 8, !tbaa !30
  %231 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %231) #8
  %232 = load ptr, ptr %10, align 8, !tbaa !5
  %233 = call i32 @clReleaseKernel(ptr noundef %232)
  %234 = load ptr, ptr %8, align 8, !tbaa !5
  %235 = call i32 @clReleaseMemObject(ptr noundef %234)
  %236 = load ptr, ptr %9, align 8, !tbaa !5
  %237 = call i32 @clReleaseMemObject(ptr noundef %236)
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = load ptr, ptr %5, align 8, !tbaa !5
  %240 = load ptr, ptr %6, align 8, !tbaa !5
  call void @r_squared(ptr noundef %238, ptr noundef %239, ptr noundef %12, ptr noundef %240)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  ret void
}

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

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

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

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

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

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

; Function Attrs: nounwind
declare i64 @clock() #1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

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

declare i32 @clReleaseKernel(ptr noundef) #0

declare i32 @clReleaseMemObject(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @r_squared(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !11, i64 24}
!10 = !{!"", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !11, i64 16}
!17 = !{!18, !19, i64 0}
!18 = !{!"", !19, i64 0, !19, i64 4, !19, i64 8, !19, i64 12}
!19 = !{!"float", !7, i64 0}
!20 = !{!18, !19, i64 4}
!21 = !{!18, !19, i64 8}
!22 = !{!18, !19, i64 12}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !26, i64 0}
!26 = !{!"double", !7, i64 0}
!27 = !{!28, !19, i64 0}
!28 = !{!"", !19, i64 0, !19, i64 4, !14, i64 8, !26, i64 16}
!29 = !{!28, !19, i64 4}
!30 = !{!28, !26, i64 16}


; 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.sum_t = type { float, float, float, float }

@device = external hidden local_unnamed_addr global ptr, align 8
@err = external hidden global i32, align 4
@context = external hidden local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@program = external hidden local_unnamed_addr global ptr, align 8
@queue = external hidden local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@start = external local_unnamed_addr global i64, align 8
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@end = external local_unnamed_addr global i64, align 8

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden ptr @error_msg(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @parallelized_regression(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca %struct.sum_t, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #11
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = shl i64 %9, 4
  %11 = tail call noalias ptr @malloc(i64 noundef %10) #12
  %12 = load ptr, ptr @context, align 8, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i64, ptr %13, align 8, !tbaa !12
  %15 = shl i64 %14, 3
  %16 = tail call ptr @clCreateBuffer(ptr noundef %12, i64 noundef 548, i64 noundef %15, ptr noundef %1, ptr noundef nonnull @err) #11
  store ptr %16, ptr %4, align 8, !tbaa !11
  %17 = load ptr, ptr @context, align 8, !tbaa !11
  %18 = load i64, ptr %8, align 8, !tbaa !5
  %19 = shl i64 %18, 4
  %20 = tail call ptr @clCreateBuffer(ptr noundef %17, i64 noundef 258, i64 noundef %19, ptr noundef null, ptr noundef nonnull @err) #11
  store ptr %20, ptr %5, align 8, !tbaa !11
  %21 = load i32, ptr @err, align 4, !tbaa !13
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %23, label %28

23:                                               ; preds = %3
  tail call void @perror(ptr noundef nonnull @.str.3) #13
  %24 = load ptr, ptr @stderr, align 8, !tbaa !11
  %25 = load i32, ptr @err, align 4, !tbaa !13
  %26 = tail call ptr @error_msg(i32 noundef %25)
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.1, ptr noundef %26) #14
  tail call void @exit(i32 noundef 1) #15
  unreachable

28:                                               ; preds = %3
  %29 = load ptr, ptr @program, align 8, !tbaa !11
  %30 = tail call ptr @clCreateKernel(ptr noundef %29, ptr noundef nonnull @.str.4, ptr noundef nonnull @err) #11
  %31 = load i32, ptr @err, align 4, !tbaa !13
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %33, label %38

33:                                               ; preds = %28
  tail call void @perror(ptr noundef nonnull @.str.5) #13
  %34 = load ptr, ptr @stderr, align 8, !tbaa !11
  %35 = load i32, ptr @err, align 4, !tbaa !13
  %36 = tail call ptr @error_msg(i32 noundef %35)
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.1, ptr noundef %36) #14
  tail call void @exit(i32 noundef 1) #15
  unreachable

38:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #11
  store i64 0, ptr %6, align 8, !tbaa !15
  %39 = load ptr, ptr @device, align 8, !tbaa !11
  %40 = call i32 @clGetKernelWorkGroupInfo(ptr noundef %30, ptr noundef %39, i32 noundef 4528, i64 noundef 8, ptr noundef nonnull %6, ptr noundef null) #11
  store i32 %40, ptr @err, align 4, !tbaa !13
  %41 = icmp slt i32 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %38
  call void @perror(ptr noundef nonnull @.str.6) #13
  %43 = load ptr, ptr @stderr, align 8, !tbaa !11
  %44 = load i32, ptr @err, align 4, !tbaa !13
  %45 = call ptr @error_msg(i32 noundef %44)
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.1, ptr noundef %45) #14
  call void @exit(i32 noundef 1) #15
  unreachable

47:                                               ; preds = %38
  %48 = getelementptr inbounds i8, ptr %0, i64 16
  %49 = load i64, ptr %48, align 8, !tbaa !16
  %50 = load i64, ptr %6, align 8, !tbaa !15
  %51 = icmp ugt i64 %49, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %47
  call void @perror(ptr noundef nonnull @.str.7) #13
  call void @exit(i32 noundef 1) #15
  unreachable

53:                                               ; preds = %47
  %54 = call i32 @clSetKernelArg(ptr noundef %30, i32 noundef 0, i64 noundef 8, ptr noundef nonnull %4) #11
  store i32 %54, ptr @err, align 4, !tbaa !13
  %55 = load i64, ptr %48, align 8, !tbaa !16
  %56 = shl i64 %55, 4
  %57 = call i32 @clSetKernelArg(ptr noundef %30, i32 noundef 1, i64 noundef %56, ptr noundef null) #11
  %58 = load i32, ptr @err, align 4, !tbaa !13
  %59 = or i32 %58, %57
  store i32 %59, ptr @err, align 4, !tbaa !13
  %60 = call i32 @clSetKernelArg(ptr noundef %30, i32 noundef 2, i64 noundef 8, ptr noundef nonnull %5) #11
  %61 = load i32, ptr @err, align 4, !tbaa !13
  %62 = or i32 %61, %60
  store i32 %62, ptr @err, align 4, !tbaa !13
  %63 = icmp slt i32 %62, 0
  br i1 %63, label %64, label %69

64:                                               ; preds = %53
  call void @perror(ptr noundef nonnull @.str.8) #13
  %65 = load ptr, ptr @stderr, align 8, !tbaa !11
  %66 = load i32, ptr @err, align 4, !tbaa !13
  %67 = call ptr @error_msg(i32 noundef %66)
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.1, ptr noundef %67) #14
  call void @exit(i32 noundef 1) #15
  unreachable

69:                                               ; preds = %53
  %70 = call i64 @clock() #11
  store i64 %70, ptr @start, align 8, !tbaa !15
  %71 = load ptr, ptr @queue, align 8, !tbaa !11
  %72 = call i32 @clEnqueueNDRangeKernel(ptr noundef %71, ptr noundef %30, i32 noundef 1, ptr noundef null, ptr noundef nonnull %13, ptr noundef nonnull %48, i32 noundef 0, ptr noundef null, ptr noundef null) #11
  store i32 %72, ptr @err, align 4, !tbaa !13
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %74, label %79

74:                                               ; preds = %69
  call void @perror(ptr noundef nonnull @.str.9) #13
  %75 = load ptr, ptr @stderr, align 8, !tbaa !11
  %76 = load i32, ptr @err, align 4, !tbaa !13
  %77 = call ptr @error_msg(i32 noundef %76)
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.1, ptr noundef %77) #14
  call void @exit(i32 noundef 1) #15
  unreachable

79:                                               ; preds = %69
  %80 = load ptr, ptr @queue, align 8, !tbaa !11
  %81 = load ptr, ptr %5, align 8, !tbaa !11
  %82 = load i64, ptr %8, align 8, !tbaa !5
  %83 = shl i64 %82, 4
  %84 = call i32 @clEnqueueReadBuffer(ptr noundef %80, ptr noundef %81, i32 noundef 1, i64 noundef 0, i64 noundef %83, ptr noundef %11, i32 noundef 0, ptr noundef null, ptr noundef null) #11
  store i32 %84, ptr @err, align 4, !tbaa !13
  %85 = icmp slt i32 %84, 0
  br i1 %85, label %86, label %91

86:                                               ; preds = %79
  call void @perror(ptr noundef nonnull @.str.10) #13
  %87 = load ptr, ptr @stderr, align 8, !tbaa !11
  %88 = load i32, ptr @err, align 4, !tbaa !13
  %89 = call ptr @error_msg(i32 noundef %88)
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.1, ptr noundef %89) #14
  call void @exit(i32 noundef 1) #15
  unreachable

91:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #11
  %92 = getelementptr inbounds i8, ptr %7, i64 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %92, i8 0, i64 12, i1 false)
  %93 = load i64, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i64 %93, 0
  br i1 %.not, label %106, label %.lr.ph

.lr.ph:                                           ; preds = %91
  %94 = getelementptr inbounds i8, ptr %7, i64 4
  %95 = getelementptr inbounds i8, ptr %7, i64 8
  %xtraiter = and i64 %93, 3
  %96 = icmp ult i64 %93, 4
  br i1 %96, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %93, -4
  br label %139

._crit_edge.unr-lcssa:                            ; preds = %139, %.lr.ph
  %.lcssa58.ph = phi <2 x float> [ poison, %.lr.ph ], [ %162, %139 ]
  %.lcssa.ph = phi <2 x float> [ poison, %.lr.ph ], [ %165, %139 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %139 ]
  %.unr = phi <2 x float> [ zeroinitializer, %.lr.ph ], [ %165, %139 ]
  %.unr59 = phi <2 x float> [ zeroinitializer, %.lr.ph ], [ %162, %139 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %97 = phi <2 x float> [ %104, %.epil.preheader ], [ %.unr, %._crit_edge.unr-lcssa ]
  %98 = phi <2 x float> [ %101, %.epil.preheader ], [ %.unr59, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.unr-lcssa ]
  %99 = getelementptr inbounds %struct.sum_t, ptr %11, i64 %indvars.iv.epil
  %100 = load <2 x float>, ptr %99, align 4, !tbaa !17
  %101 = fadd <2 x float> %100, %98
  %102 = getelementptr inbounds i8, ptr %99, i64 8
  %103 = load <2 x float>, ptr %102, align 4, !tbaa !17
  %104 = fadd <2 x float> %103, %97
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !19

._crit_edge:                                      ; preds = %.epil.preheader, %._crit_edge.unr-lcssa
  %.lcssa58 = phi <2 x float> [ %.lcssa58.ph, %._crit_edge.unr-lcssa ], [ %101, %.epil.preheader ]
  %.lcssa = phi <2 x float> [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %104, %.epil.preheader ]
  %105 = extractelement <2 x float> %.lcssa58, i64 1
  store float %105, ptr %94, align 4, !tbaa !21
  store <2 x float> %.lcssa, ptr %95, align 4, !tbaa !17
  br label %106

106:                                              ; preds = %._crit_edge, %91
  %107 = phi <2 x float> [ %.lcssa, %._crit_edge ], [ zeroinitializer, %91 ]
  %108 = phi <2 x float> [ %.lcssa58, %._crit_edge ], [ zeroinitializer, %91 ]
  %109 = extractelement <2 x float> %108, i64 0
  store float %109, ptr %7, align 4, !tbaa !23
  %110 = load i64, ptr %13, align 8, !tbaa !12
  %111 = uitofp i64 %110 to float
  %112 = fneg float %109
  %113 = fmul float %109, %112
  %114 = extractelement <2 x float> %107, i64 1
  %115 = call float @llvm.fmuladd.f32(float %111, float %114, float %113)
  %116 = shufflevector <2 x float> %107, <2 x float> poison, <2 x i32> <i32 poison, i32 0>
  %117 = shufflevector <2 x float> %116, <2 x float> %108, <2 x i32> <i32 3, i32 1>
  %118 = insertelement <2 x float> poison, float %112, i64 0
  %119 = shufflevector <2 x float> %118, <2 x float> poison, <2 x i32> zeroinitializer
  %120 = fmul <2 x float> %117, %119
  %121 = insertelement <2 x float> %108, float %111, i64 0
  %122 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %121, <2 x float> %107, <2 x float> %120)
  %123 = insertelement <2 x float> poison, float %115, i64 0
  %124 = shufflevector <2 x float> %123, <2 x float> poison, <2 x i32> zeroinitializer
  %125 = fdiv <2 x float> %122, %124
  %126 = shufflevector <2 x float> %125, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  store <2 x float> %126, ptr %2, align 8, !tbaa !17
  %127 = call i64 @clock() #11
  store i64 %127, ptr @end, align 8, !tbaa !15
  %128 = load i64, ptr @start, align 8, !tbaa !15
  %129 = sub nsw i64 %127, %128
  %130 = sitofp i64 %129 to double
  %131 = fdiv double %130, 1.000000e+06
  %132 = fmul double %131, 1.000000e+03
  %133 = getelementptr inbounds i8, ptr %2, i64 16
  store double %132, ptr %133, align 8, !tbaa !24
  call void @free(ptr noundef %11) #11
  %134 = call i32 @clReleaseKernel(ptr noundef %30) #11
  %135 = load ptr, ptr %4, align 8, !tbaa !11
  %136 = call i32 @clReleaseMemObject(ptr noundef %135) #11
  %137 = load ptr, ptr %5, align 8, !tbaa !11
  %138 = call i32 @clReleaseMemObject(ptr noundef %137) #11
  call void @r_squared(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %7, ptr noundef nonnull %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  ret void

139:                                              ; preds = %139, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %139 ]
  %140 = phi <2 x float> [ zeroinitializer, %.lr.ph.new ], [ %165, %139 ]
  %141 = phi <2 x float> [ zeroinitializer, %.lr.ph.new ], [ %162, %139 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %139 ]
  %142 = getelementptr inbounds %struct.sum_t, ptr %11, i64 %indvars.iv
  %143 = load <2 x float>, ptr %142, align 4, !tbaa !17
  %144 = fadd <2 x float> %143, %141
  %145 = getelementptr inbounds i8, ptr %142, i64 8
  %146 = load <2 x float>, ptr %145, align 4, !tbaa !17
  %147 = fadd <2 x float> %146, %140
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %148 = getelementptr inbounds %struct.sum_t, ptr %11, i64 %indvars.iv.next
  %149 = load <2 x float>, ptr %148, align 4, !tbaa !17
  %150 = fadd <2 x float> %149, %144
  %151 = getelementptr inbounds i8, ptr %148, i64 8
  %152 = load <2 x float>, ptr %151, align 4, !tbaa !17
  %153 = fadd <2 x float> %152, %147
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %154 = getelementptr inbounds %struct.sum_t, ptr %11, i64 %indvars.iv.next.1
  %155 = load <2 x float>, ptr %154, align 4, !tbaa !17
  %156 = fadd <2 x float> %155, %150
  %157 = getelementptr inbounds i8, ptr %154, i64 8
  %158 = load <2 x float>, ptr %157, align 4, !tbaa !17
  %159 = fadd <2 x float> %158, %153
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %160 = getelementptr inbounds %struct.sum_t, ptr %11, i64 %indvars.iv.next.2
  %161 = load <2 x float>, ptr %160, align 4, !tbaa !17
  %162 = fadd <2 x float> %161, %156
  %163 = getelementptr inbounds i8, ptr %160, i64 8
  %164 = load <2 x float>, ptr %163, align 4, !tbaa !17
  %165 = fadd <2 x float> %164, %159
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %139, !llvm.loop !27
}

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

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

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

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

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

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #6

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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #8

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

declare i32 @clReleaseKernel(ptr noundef) local_unnamed_addr #5

declare i32 @clReleaseMemObject(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden void @r_squared(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #10

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind }
attributes #12 = { nounwind allocsize(0) }
attributes #13 = { cold }
attributes #14 = { cold nounwind }
attributes #15 = { noreturn 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, !10, i64 24}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !10, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = !{!22, !18, i64 4}
!22 = !{!"", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!23 = !{!22, !18, i64 0}
!24 = !{!25, !26, i64 16}
!25 = !{!"", !18, i64 0, !18, i64 4, !14, i64 8, !26, i64 16}
!26 = !{!"double", !8, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass