; LLVM IR from bondhugula/pluto :: examples/corcol (corcol)

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

@float_n = external dso_local global float, align 4
@eps = external dso_local global float, align 4
@data = external dso_local global [2001 x [2001 x float]], align 16
@symmat = external dso_local global [2001 x [2001 x float]], align 16
@mean = external dso_local global [2001 x float], align 16
@stddev = external dso_local global [2001 x float], align 16
@stdout = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @init_array() #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 nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @print_array() #0

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

; Function Attrs: nounwind uwtable
declare dso_local double @rtclock() #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @init_array()
  %12 = call double @rtclock()
  store double %12, ptr %6, align 8, !tbaa !11
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %46, %2
  %14 = load i32, ptr %9, align 4, !tbaa !5
  %15 = icmp sle i32 %14, 2000
  br i1 %15, label %16, label %49

16:                                               ; preds = %13
  %17 = load i32, ptr %9, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %18
  store float 0.000000e+00, ptr %19, align 4, !tbaa !13
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %36, %16
  %21 = load i32, ptr %8, align 4, !tbaa !5
  %22 = icmp sle i32 %21, 2000
  br i1 %22, label %23, label %39

23:                                               ; preds = %20
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %25
  %27 = load i32, ptr %9, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [2001 x float], ptr %26, i64 0, i64 %28
  %30 = load float, ptr %29, align 4, !tbaa !13
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %32
  %34 = load float, ptr %33, align 4, !tbaa !13
  %35 = fadd float %34, %30
  store float %35, ptr %33, align 4, !tbaa !13
  br label %36

36:                                               ; preds = %23
  %37 = load i32, ptr %8, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %8, align 4, !tbaa !5
  br label %20, !llvm.loop !15

39:                                               ; preds = %20
  %40 = load float, ptr @float_n, align 4, !tbaa !13
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %42
  %44 = load float, ptr %43, align 4, !tbaa !13
  %45 = fdiv float %44, %40
  store float %45, ptr %43, align 4, !tbaa !13
  br label %46

46:                                               ; preds = %39
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %9, align 4, !tbaa !5
  br label %13, !llvm.loop !17

49:                                               ; preds = %13
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %129, %49
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = icmp sle i32 %51, 2000
  br i1 %52, label %53, label %132

53:                                               ; preds = %50
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %55
  store float 0.000000e+00, ptr %56, align 4, !tbaa !13
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %90, %53
  %58 = load i32, ptr %8, align 4, !tbaa !5
  %59 = icmp sle i32 %58, 2000
  br i1 %59, label %60, label %93

60:                                               ; preds = %57
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %62
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [2001 x float], ptr %63, i64 0, i64 %65
  %67 = load float, ptr %66, align 4, !tbaa !13
  %68 = load i32, ptr %9, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %69
  %71 = load float, ptr %70, align 4, !tbaa !13
  %72 = fsub float %67, %71
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %74
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2001 x float], ptr %75, i64 0, i64 %77
  %79 = load float, ptr %78, align 4, !tbaa !13
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %81
  %83 = load float, ptr %82, align 4, !tbaa !13
  %84 = fsub float %79, %83
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %86
  %88 = load float, ptr %87, align 4, !tbaa !13
  %89 = call float @llvm.fmuladd.f32(float %72, float %84, float %88)
  store float %89, ptr %87, align 4, !tbaa !13
  br label %90

90:                                               ; preds = %60
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %8, align 4, !tbaa !5
  br label %57, !llvm.loop !18

93:                                               ; preds = %57
  %94 = load float, ptr @float_n, align 4, !tbaa !13
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %96
  %98 = load float, ptr %97, align 4, !tbaa !13
  %99 = fdiv float %98, %94
  store float %99, ptr %97, align 4, !tbaa !13
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !13
  %104 = fpext float %103 to double
  %105 = call double @sqrt(double noundef %104) #5
  %106 = fptrunc double %105 to float
  %107 = load i32, ptr %9, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %108
  store float %106, ptr %109, align 4, !tbaa !13
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %111
  %113 = load float, ptr %112, align 4, !tbaa !13
  %114 = load float, ptr @eps, align 4, !tbaa !13
  %115 = fcmp ole float %113, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %93
  br label %123

117:                                              ; preds = %93
  %118 = load i32, ptr %9, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %119
  %121 = load float, ptr %120, align 4, !tbaa !13
  %122 = fpext float %121 to double
  br label %123

123:                                              ; preds = %117, %116
  %124 = phi double [ 1.000000e+00, %116 ], [ %122, %117 ]
  %125 = fptrunc double %124 to float
  %126 = load i32, ptr %9, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %127
  store float %125, ptr %128, align 4, !tbaa !13
  br label %129

129:                                              ; preds = %123
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %9, align 4, !tbaa !5
  br label %50, !llvm.loop !19

132:                                              ; preds = %50
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %176, %132
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = icmp sle i32 %134, 2000
  br i1 %135, label %136, label %179

136:                                              ; preds = %133
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %172, %136
  %138 = load i32, ptr %9, align 4, !tbaa !5
  %139 = icmp sle i32 %138, 2000
  br i1 %139, label %140, label %175

140:                                              ; preds = %137
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %142
  %144 = load float, ptr %143, align 4, !tbaa !13
  %145 = load i32, ptr %8, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %146
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [2001 x float], ptr %147, i64 0, i64 %149
  %151 = load float, ptr %150, align 4, !tbaa !13
  %152 = fsub float %151, %144
  store float %152, ptr %150, align 4, !tbaa !13
  %153 = load float, ptr @float_n, align 4, !tbaa !13
  %154 = fpext float %153 to double
  %155 = call double @sqrt(double noundef %154) #5
  %156 = load i32, ptr %9, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %157
  %159 = load float, ptr %158, align 4, !tbaa !13
  %160 = fpext float %159 to double
  %161 = fmul double %155, %160
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %163
  %165 = load i32, ptr %9, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [2001 x float], ptr %164, i64 0, i64 %166
  %168 = load float, ptr %167, align 4, !tbaa !13
  %169 = fpext float %168 to double
  %170 = fdiv double %169, %161
  %171 = fptrunc double %170 to float
  store float %171, ptr %167, align 4, !tbaa !13
  br label %172

172:                                              ; preds = %140
  %173 = load i32, ptr %9, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %9, align 4, !tbaa !5
  br label %137, !llvm.loop !20

175:                                              ; preds = %137
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %8, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %8, align 4, !tbaa !5
  br label %133, !llvm.loop !21

179:                                              ; preds = %133
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %249, %179
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = icmp sle i32 %181, 1999
  br i1 %182, label %183, label %252

183:                                              ; preds = %180
  %184 = load i32, ptr %10, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %185
  %187 = load i32, ptr %10, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [2001 x float], ptr %186, i64 0, i64 %188
  store float 1.000000e+00, ptr %189, align 4, !tbaa !13
  %190 = load i32, ptr %10, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %11, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %245, %183
  %193 = load i32, ptr %11, align 4, !tbaa !5
  %194 = icmp sle i32 %193, 2000
  br i1 %194, label %195, label %248

195:                                              ; preds = %192
  %196 = load i32, ptr %10, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %197
  %199 = load i32, ptr %11, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [2001 x float], ptr %198, i64 0, i64 %200
  store float 0.000000e+00, ptr %201, align 4, !tbaa !13
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %228, %195
  %203 = load i32, ptr %8, align 4, !tbaa !5
  %204 = icmp sle i32 %203, 2000
  br i1 %204, label %205, label %231

205:                                              ; preds = %202
  %206 = load i32, ptr %8, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %207
  %209 = load i32, ptr %10, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [2001 x float], ptr %208, i64 0, i64 %210
  %212 = load float, ptr %211, align 4, !tbaa !13
  %213 = load i32, ptr %8, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %214
  %216 = load i32, ptr %11, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [2001 x float], ptr %215, i64 0, i64 %217
  %219 = load float, ptr %218, align 4, !tbaa !13
  %220 = load i32, ptr %10, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %221
  %223 = load i32, ptr %11, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [2001 x float], ptr %222, i64 0, i64 %224
  %226 = load float, ptr %225, align 4, !tbaa !13
  %227 = call float @llvm.fmuladd.f32(float %212, float %219, float %226)
  store float %227, ptr %225, align 4, !tbaa !13
  br label %228

228:                                              ; preds = %205
  %229 = load i32, ptr %8, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %8, align 4, !tbaa !5
  br label %202, !llvm.loop !22

231:                                              ; preds = %202
  %232 = load i32, ptr %10, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %233
  %235 = load i32, ptr %11, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [2001 x float], ptr %234, i64 0, i64 %236
  %238 = load float, ptr %237, align 4, !tbaa !13
  %239 = load i32, ptr %11, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %240
  %242 = load i32, ptr %10, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [2001 x float], ptr %241, i64 0, i64 %243
  store float %238, ptr %244, align 4, !tbaa !13
  br label %245

245:                                              ; preds = %231
  %246 = load i32, ptr %11, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %11, align 4, !tbaa !5
  br label %192, !llvm.loop !23

248:                                              ; preds = %192
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %10, align 4, !tbaa !5
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %10, align 4, !tbaa !5
  br label %180, !llvm.loop !24

252:                                              ; preds = %180
  store float 1.000000e+00, ptr getelementptr inbounds ([2001 x float], ptr getelementptr inbounds ([2001 x [2001 x float]], ptr @symmat, i64 0, i64 2000), i64 0, i64 2000), align 16, !tbaa !13
  %253 = call double @rtclock()
  store double %253, ptr %7, align 8, !tbaa !11
  %254 = load ptr, ptr @stdout, align 8, !tbaa !9
  %255 = load double, ptr %7, align 8, !tbaa !11
  %256 = load double, ptr %6, align 8, !tbaa !11
  %257 = fsub double %255, %256
  %258 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %254, ptr noundef @.str.7, double noundef %257) #5
  %259 = call noalias ptr @fopen(ptr noundef @.str.8, ptr noundef @.str.9)
  %260 = icmp ne ptr %259, null
  br i1 %260, label %261, label %262

261:                                              ; preds = %252
  call void @print_array()
  br label %262

262:                                              ; preds = %261, %252
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  ret i32 0
}

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

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

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 nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !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"

@float_n = external dso_local local_unnamed_addr global float, align 4
@eps = external dso_local local_unnamed_addr global float, align 4
@data = external dso_local local_unnamed_addr global [2001 x [2001 x float]], align 16
@symmat = external dso_local local_unnamed_addr global [2001 x [2001 x float]], align 16
@mean = external dso_local local_unnamed_addr global [2001 x float], align 16
@stddev = external dso_local local_unnamed_addr global [2001 x float], align 16
@stdout = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @init_array() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @print_array() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local double @rtclock() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  tail call void @init_array()
  %3 = tail call double @rtclock()
  %4 = load float, ptr @float_n, align 4, !tbaa !5
  br label %5

5:                                                ; preds = %2, %24
  %indvars.iv84 = phi i64 [ 1, %2 ], [ %indvars.iv.next85, %24 ]
  %6 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %indvars.iv84
  br label %7

7:                                                ; preds = %7, %5
  %indvars.iv = phi i64 [ 1, %5 ], [ %indvars.iv.next.4, %7 ]
  %8 = phi float [ 0.000000e+00, %5 ], [ %23, %7 ]
  %9 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv, i64 %indvars.iv84
  %10 = load float, ptr %9, align 4, !tbaa !5
  %11 = fadd float %10, %8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next, i64 %indvars.iv84
  %13 = load float, ptr %12, align 4, !tbaa !5
  %14 = fadd float %13, %11
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %15 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next.1, i64 %indvars.iv84
  %16 = load float, ptr %15, align 4, !tbaa !5
  %17 = fadd float %16, %14
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %18 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next.2, i64 %indvars.iv84
  %19 = load float, ptr %18, align 4, !tbaa !5
  %20 = fadd float %19, %17
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %21 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next.3, i64 %indvars.iv84
  %22 = load float, ptr %21, align 4, !tbaa !5
  %23 = fadd float %22, %20
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
  %exitcond.not.4 = icmp eq i64 %indvars.iv.next.4, 2001
  br i1 %exitcond.not.4, label %24, label %7, !llvm.loop !9

24:                                               ; preds = %7
  %25 = fdiv float %23, %4
  store float %25, ptr %6, align 4, !tbaa !5
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next85, 2001
  br i1 %exitcond87.not, label %.preheader67, label %5, !llvm.loop !11

.preheader67:                                     ; preds = %24, %47
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %47 ], [ 1, %24 ]
  %26 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %indvars.iv92
  %27 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %indvars.iv92
  %28 = load float, ptr %27, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %29, %.preheader67
  %indvars.iv88 = phi i64 [ 1, %.preheader67 ], [ %indvars.iv.next89.3, %29 ]
  %30 = phi float [ 0.000000e+00, %.preheader67 ], [ %46, %29 ]
  %31 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv88, i64 %indvars.iv92
  %32 = load float, ptr %31, align 4, !tbaa !5
  %33 = fsub float %32, %28
  %34 = tail call float @llvm.fmuladd.f32(float %33, float %33, float %30)
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %35 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next89, i64 %indvars.iv92
  %36 = load float, ptr %35, align 4, !tbaa !5
  %37 = fsub float %36, %28
  %38 = tail call float @llvm.fmuladd.f32(float %37, float %37, float %34)
  %indvars.iv.next89.1 = add nuw nsw i64 %indvars.iv88, 2
  %39 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next89.1, i64 %indvars.iv92
  %40 = load float, ptr %39, align 4, !tbaa !5
  %41 = fsub float %40, %28
  %42 = tail call float @llvm.fmuladd.f32(float %41, float %41, float %38)
  %indvars.iv.next89.2 = add nuw nsw i64 %indvars.iv88, 3
  %43 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next89.2, i64 %indvars.iv92
  %44 = load float, ptr %43, align 4, !tbaa !5
  %45 = fsub float %44, %28
  %46 = tail call float @llvm.fmuladd.f32(float %45, float %45, float %42)
  %indvars.iv.next89.3 = add nuw nsw i64 %indvars.iv88, 4
  %exitcond91.not.3 = icmp eq i64 %indvars.iv.next89.3, 2001
  br i1 %exitcond91.not.3, label %47, label %29, !llvm.loop !12

47:                                               ; preds = %29
  %48 = load float, ptr @float_n, align 4, !tbaa !5
  %49 = fdiv float %46, %48
  %sqrtf = tail call float @sqrtf(float noundef %49) #3
  %50 = load float, ptr @eps, align 4, !tbaa !5
  %51 = fcmp ugt float %sqrtf, %50
  %52 = select i1 %51, float %sqrtf, float 1.000000e+00
  store float %52, ptr %26, align 4, !tbaa !5
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond95.not = icmp eq i64 %indvars.iv.next93, 2001
  br i1 %exitcond95.not, label %.preheader65, label %.preheader67, !llvm.loop !13

.preheader65:                                     ; preds = %47, %70
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %70 ], [ 1, %47 ]
  br label %53

53:                                               ; preds = %.preheader65, %53
  %indvars.iv96 = phi i64 [ 1, %.preheader65 ], [ %indvars.iv.next97, %53 ]
  %54 = getelementptr inbounds [2001 x float], ptr @mean, i64 0, i64 %indvars.iv96
  %55 = load float, ptr %54, align 4, !tbaa !5
  %56 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv100, i64 %indvars.iv96
  %57 = load float, ptr %56, align 4, !tbaa !5
  %58 = fsub float %57, %55
  store float %58, ptr %56, align 4, !tbaa !5
  %59 = load float, ptr @float_n, align 4, !tbaa !5
  %60 = fpext float %59 to double
  %61 = tail call double @sqrt(double noundef %60) #4
  %62 = getelementptr inbounds [2001 x float], ptr @stddev, i64 0, i64 %indvars.iv96
  %63 = load float, ptr %62, align 4, !tbaa !5
  %64 = fpext float %63 to double
  %65 = fmul double %61, %64
  %66 = load float, ptr %56, align 4, !tbaa !5
  %67 = fpext float %66 to double
  %68 = fdiv double %67, %65
  %69 = fptrunc double %68 to float
  store float %69, ptr %56, align 4, !tbaa !5
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next97, 2001
  br i1 %exitcond99.not, label %70, label %53, !llvm.loop !14

70:                                               ; preds = %53
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond103.not = icmp eq i64 %indvars.iv.next101, 2001
  br i1 %exitcond103.not, label %.lr.ph.preheader, label %.preheader65, !llvm.loop !15

.loopexit:                                        ; preds = %85
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond117.not = icmp eq i64 %indvars.iv.next115, 2000
  br i1 %exitcond117.not, label %87, label %.lr.ph.preheader, !llvm.loop !16

.lr.ph.preheader:                                 ; preds = %70, %.loopexit
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %.loopexit ], [ 1, %70 ]
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %.loopexit ], [ 2, %70 ]
  %71 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %indvars.iv114, i64 %indvars.iv114
  store float 1.000000e+00, ptr %71, align 4, !tbaa !5
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %85
  %indvars.iv110 = phi i64 [ %indvars.iv108, %.lr.ph.preheader ], [ %indvars.iv.next111, %85 ]
  %72 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %indvars.iv114, i64 %indvars.iv110
  br label %73

73:                                               ; preds = %73, %.lr.ph
  %indvars.iv104 = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next105.1, %73 ]
  %74 = phi float [ 0.000000e+00, %.lr.ph ], [ %84, %73 ]
  %75 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv104, i64 %indvars.iv114
  %76 = load float, ptr %75, align 4, !tbaa !5
  %77 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv104, i64 %indvars.iv110
  %78 = load float, ptr %77, align 4, !tbaa !5
  %79 = tail call float @llvm.fmuladd.f32(float %76, float %78, float %74)
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %80 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next105, i64 %indvars.iv114
  %81 = load float, ptr %80, align 4, !tbaa !5
  %82 = getelementptr inbounds [2001 x [2001 x float]], ptr @data, i64 0, i64 %indvars.iv.next105, i64 %indvars.iv110
  %83 = load float, ptr %82, align 4, !tbaa !5
  %84 = tail call float @llvm.fmuladd.f32(float %81, float %83, float %79)
  %indvars.iv.next105.1 = add nuw nsw i64 %indvars.iv104, 2
  %exitcond107.not.1 = icmp eq i64 %indvars.iv.next105.1, 2001
  br i1 %exitcond107.not.1, label %85, label %73, !llvm.loop !17

85:                                               ; preds = %73
  store float %84, ptr %72, align 4, !tbaa !5
  %86 = getelementptr inbounds [2001 x [2001 x float]], ptr @symmat, i64 0, i64 %indvars.iv110, i64 %indvars.iv114
  store float %84, ptr %86, align 4, !tbaa !5
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next111, 2001
  br i1 %exitcond113.not, label %.loopexit, label %.lr.ph, !llvm.loop !18

87:                                               ; preds = %.loopexit
  store float 1.000000e+00, ptr getelementptr inbounds (i8, ptr @symmat, i64 16016000), align 16, !tbaa !5
  %88 = tail call double @rtclock()
  %89 = load ptr, ptr @stdout, align 8, !tbaa !19
  %90 = fsub double %88, %3
  %91 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.7, double noundef %90) #4
  %92 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9)
  %.not = icmp eq ptr %92, null
  br i1 %.not, label %94, label %93

93:                                               ; preds = %87
  tail call void @print_array()
  br label %94

94:                                               ; preds = %93, %87
  ret i32 0
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

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

declare float @sqrtf(float) local_unnamed_addr

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 speculatable willreturn memory(none) }
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 memory(write) "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 }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass