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

; 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 double, align 8
@data = external dso_local global [1501 x [1501 x double]], align 16
@symmat = external dso_local global [1501 x [1501 x double]], align 16
@mean = external dso_local global [1501 x double], align 16
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = 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 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; 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) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @init_array()
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %45, %2
  %13 = load i32, ptr %9, align 4, !tbaa !5
  %14 = icmp sle i32 %13, 1500
  br i1 %14, label %15, label %48

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

19:                                               ; preds = %35, %15
  %20 = load i32, ptr %8, align 4, !tbaa !5
  %21 = icmp sle i32 %20, 1500
  br i1 %21, label %22, label %38

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

35:                                               ; preds = %22
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %8, align 4, !tbaa !5
  br label %19, !llvm.loop !13

38:                                               ; preds = %19
  %39 = load double, ptr @float_n, align 8, !tbaa !11
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [1501 x double], ptr @mean, i64 0, i64 %41
  %43 = load double, ptr %42, align 8, !tbaa !11
  %44 = fdiv double %43, %39
  store double %44, ptr %42, align 8, !tbaa !11
  br label %45

45:                                               ; preds = %38
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %9, align 4, !tbaa !5
  br label %12, !llvm.loop !15

48:                                               ; preds = %12
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %73, %48
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = icmp sle i32 %50, 1500
  br i1 %51, label %52, label %76

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

53:                                               ; preds = %69, %52
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = icmp sle i32 %54, 1500
  br i1 %55, label %56, label %72

56:                                               ; preds = %53
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1501 x double], ptr @mean, i64 0, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %62
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [1501 x double], ptr %63, i64 0, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = fsub double %67, %60
  store double %68, ptr %66, align 8, !tbaa !11
  br label %69

69:                                               ; preds = %56
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %9, align 4, !tbaa !5
  br label %53, !llvm.loop !16

72:                                               ; preds = %53
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %8, align 4, !tbaa !5
  br label %49, !llvm.loop !17

76:                                               ; preds = %49
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %96, %76
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = icmp sle i32 %78, 1500
  br i1 %79, label %80, label %99

80:                                               ; preds = %77
  %81 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %81, ptr %11, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %92, %80
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = icmp sle i32 %83, 1500
  br i1 %84, label %85, label %95

85:                                               ; preds = %82
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1501 x [1501 x double]], ptr @symmat, i64 0, i64 %87
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1501 x double], ptr %88, i64 0, i64 %90
  store double 0.000000e+00, ptr %91, align 8, !tbaa !11
  br label %92

92:                                               ; preds = %85
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %11, align 4, !tbaa !5
  br label %82, !llvm.loop !18

95:                                               ; preds = %82
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %10, align 4, !tbaa !5
  br label %77, !llvm.loop !19

99:                                               ; preds = %77
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %156, %99
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = icmp sle i32 %101, 1500
  br i1 %102, label %103, label %159

103:                                              ; preds = %100
  %104 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %104, ptr %11, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %152, %103
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = icmp sle i32 %106, 1500
  br i1 %107, label %108, label %155

108:                                              ; preds = %105
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %135, %108
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = icmp sle i32 %110, 1500
  br i1 %111, label %112, label %138

112:                                              ; preds = %109
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %114
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [1501 x double], ptr %115, i64 0, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !11
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %121
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [1501 x double], ptr %122, i64 0, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !11
  %127 = load i32, ptr %10, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [1501 x [1501 x double]], ptr @symmat, i64 0, i64 %128
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [1501 x double], ptr %129, i64 0, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !11
  %134 = call double @llvm.fmuladd.f64(double %119, double %126, double %133)
  store double %134, ptr %132, align 8, !tbaa !11
  br label %135

135:                                              ; preds = %112
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %8, align 4, !tbaa !5
  br label %109, !llvm.loop !20

138:                                              ; preds = %109
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1501 x [1501 x double]], ptr @symmat, i64 0, i64 %140
  %142 = load i32, ptr %11, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [1501 x double], ptr %141, i64 0, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !11
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [1501 x [1501 x double]], ptr @symmat, i64 0, i64 %147
  %149 = load i32, ptr %10, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [1501 x double], ptr %148, i64 0, i64 %150
  store double %145, ptr %151, align 8, !tbaa !11
  br label %152

152:                                              ; preds = %138
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %11, align 4, !tbaa !5
  br label %105, !llvm.loop !21

155:                                              ; preds = %105
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %10, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %10, align 4, !tbaa !5
  br label %100, !llvm.loop !22

159:                                              ; preds = %100
  %160 = call noalias ptr @fopen(ptr noundef @.str.3, ptr noundef @.str.4)
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %163

162:                                              ; preds = %159
  call void @print_array()
  br label %163

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

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

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 = { "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 = !{!"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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; 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 double, align 8
@data = external dso_local local_unnamed_addr global [1501 x [1501 x double]], align 16
@symmat = external dso_local local_unnamed_addr global [1501 x [1501 x double]], align 16
@mean = external dso_local local_unnamed_addr global [1501 x double], align 16
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = 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: nounwind uwtable
declare dso_local void @print_array() local_unnamed_addr #0

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

; 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 = load double, ptr @float_n, align 8, !tbaa !5
  br label %4

4:                                                ; preds = %2, %26
  %indvars.iv65 = phi i64 [ 1, %2 ], [ %indvars.iv.next66, %26 ]
  %5 = getelementptr inbounds [1501 x double], ptr @mean, i64 0, i64 %indvars.iv65
  br label %6

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

26:                                               ; preds = %6
  %27 = fdiv double %25, %3
  store double %27, ptr %5, align 8, !tbaa !5
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond68.not = icmp eq i64 %indvars.iv.next66, 1501
  br i1 %exitcond68.not, label %vector.ph, label %4, !llvm.loop !11

vector.ph:                                        ; preds = %26, %middle.block
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %middle.block ], [ 1, %26 ]
  br label %vector.body

vector.body:                                      ; preds = %vector.body.1, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next.1, %vector.body.1 ]
  %offset.idx = or disjoint i64 %index, 1
  %28 = getelementptr inbounds [1501 x double], ptr @mean, i64 0, i64 %offset.idx
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load = load <2 x double>, ptr %28, align 8, !tbaa !5
  %wide.load98 = load <2 x double>, ptr %29, align 8, !tbaa !5
  %30 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv73, i64 %offset.idx
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load99 = load <2 x double>, ptr %30, align 8, !tbaa !5
  %wide.load100 = load <2 x double>, ptr %31, align 8, !tbaa !5
  %32 = fsub <2 x double> %wide.load99, %wide.load
  %33 = fsub <2 x double> %wide.load100, %wide.load98
  store <2 x double> %32, ptr %30, align 8, !tbaa !5
  store <2 x double> %33, ptr %31, align 8, !tbaa !5
  %34 = icmp eq i64 %index, 1496
  br i1 %34, label %middle.block, label %vector.body.1, !llvm.loop !12

vector.body.1:                                    ; preds = %vector.body
  %offset.idx.1 = or disjoint i64 %index, 5
  %35 = getelementptr inbounds [1501 x double], ptr @mean, i64 0, i64 %offset.idx.1
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %wide.load.1 = load <2 x double>, ptr %35, align 8, !tbaa !5
  %wide.load98.1 = load <2 x double>, ptr %36, align 8, !tbaa !5
  %37 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv73, i64 %offset.idx.1
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load99.1 = load <2 x double>, ptr %37, align 8, !tbaa !5
  %wide.load100.1 = load <2 x double>, ptr %38, align 8, !tbaa !5
  %39 = fsub <2 x double> %wide.load99.1, %wide.load.1
  %40 = fsub <2 x double> %wide.load100.1, %wide.load98.1
  store <2 x double> %39, ptr %37, align 8, !tbaa !5
  store <2 x double> %40, ptr %38, align 8, !tbaa !5
  %index.next.1 = add nuw nsw i64 %index, 8
  br label %vector.body

middle.block:                                     ; preds = %vector.body
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next74, 1501
  br i1 %exitcond76.not, label %.preheader48, label %vector.ph, !llvm.loop !15

.preheader48:                                     ; preds = %middle.block, %.preheader48
  %indvar = phi i64 [ %indvar.next.4, %.preheader48 ], [ 0, %middle.block ]
  %41 = mul nuw nsw i64 %indvar, 12016
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @symmat, i64 12016), i64 %41
  %42 = shl i64 %indvar, 3
  %43 = sub nuw nsw i64 12000, %42
  tail call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %43, i1 false), !tbaa !5
  %indvar.next = add nuw nsw i64 %indvar, 1
  %44 = mul nuw nsw i64 %indvar.next, 12016
  %gep.1 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @symmat, i64 12016), i64 %44
  %45 = shl i64 %indvar.next, 3
  %46 = sub nuw nsw i64 12000, %45
  tail call void @llvm.memset.p0.i64(ptr align 16 %gep.1, i8 0, i64 %46, i1 false), !tbaa !5
  %indvar.next.1 = add nuw nsw i64 %indvar, 2
  %47 = mul nuw nsw i64 %indvar.next.1, 12016
  %gep.2 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @symmat, i64 12016), i64 %47
  %48 = shl i64 %indvar.next.1, 3
  %49 = sub nuw nsw i64 12000, %48
  tail call void @llvm.memset.p0.i64(ptr align 16 %gep.2, i8 0, i64 %49, i1 false), !tbaa !5
  %indvar.next.2 = add nuw nsw i64 %indvar, 3
  %50 = mul nuw nsw i64 %indvar.next.2, 12016
  %gep.3 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @symmat, i64 12016), i64 %50
  %51 = shl i64 %indvar.next.2, 3
  %52 = sub nuw nsw i64 12000, %51
  tail call void @llvm.memset.p0.i64(ptr align 16 %gep.3, i8 0, i64 %52, i1 false), !tbaa !5
  %indvar.next.3 = add nuw nsw i64 %indvar, 4
  %53 = mul nuw nsw i64 %indvar.next.3, 12016
  %gep.4 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @symmat, i64 12016), i64 %53
  %54 = shl i64 %indvar.next.3, 3
  %55 = sub nuw nsw i64 12000, %54
  tail call void @llvm.memset.p0.i64(ptr align 16 %gep.4, i8 0, i64 %55, i1 false), !tbaa !5
  %indvar.next.4 = add nuw nsw i64 %indvar, 5
  %exitcond83.not.4 = icmp eq i64 %indvar.next.4, 1500
  br i1 %exitcond83.not.4, label %.preheader46, label %.preheader48, !llvm.loop !16

.preheader46:                                     ; preds = %.preheader48, %76
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %76 ], [ 1, %.preheader48 ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader46, %74
  %indvars.iv90 = phi i64 [ %indvars.iv88, %.preheader46 ], [ %indvars.iv.next91, %74 ]
  %56 = getelementptr inbounds [1501 x [1501 x double]], ptr @symmat, i64 0, i64 %indvars.iv88, i64 %indvars.iv90
  %.promoted58 = load double, ptr %56, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %57, %.preheader
  %indvars.iv84 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next85.2, %57 ]
  %58 = phi double [ %.promoted58, %.preheader ], [ %73, %57 ]
  %59 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv84, i64 %indvars.iv88
  %60 = load double, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv84, i64 %indvars.iv90
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = tail call double @llvm.fmuladd.f64(double %60, double %62, double %58)
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %64 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv.next85, i64 %indvars.iv88
  %65 = load double, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv.next85, i64 %indvars.iv90
  %67 = load double, ptr %66, align 8, !tbaa !5
  %68 = tail call double @llvm.fmuladd.f64(double %65, double %67, double %63)
  %indvars.iv.next85.1 = add nuw nsw i64 %indvars.iv84, 2
  %69 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv.next85.1, i64 %indvars.iv88
  %70 = load double, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds [1501 x [1501 x double]], ptr @data, i64 0, i64 %indvars.iv.next85.1, i64 %indvars.iv90
  %72 = load double, ptr %71, align 8, !tbaa !5
  %73 = tail call double @llvm.fmuladd.f64(double %70, double %72, double %68)
  %indvars.iv.next85.2 = add nuw nsw i64 %indvars.iv84, 3
  %exitcond87.not.2 = icmp eq i64 %indvars.iv.next85.2, 1501
  br i1 %exitcond87.not.2, label %74, label %57, !llvm.loop !17

74:                                               ; preds = %57
  store double %73, ptr %56, align 8, !tbaa !5
  %75 = getelementptr inbounds [1501 x [1501 x double]], ptr @symmat, i64 0, i64 %indvars.iv90, i64 %indvars.iv88
  store double %73, ptr %75, align 8, !tbaa !5
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next91, 1501
  br i1 %exitcond93.not, label %76, label %.preheader, !llvm.loop !18

76:                                               ; preds = %74
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond95.not = icmp eq i64 %indvars.iv.next89, 1501
  br i1 %exitcond95.not, label %77, label %.preheader46, !llvm.loop !19

77:                                               ; preds = %76
  %78 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4)
  %.not = icmp eq ptr %78, null
  br i1 %.not, label %80, label %79

79:                                               ; preds = %77
  tail call void @print_array()
  br label %80

80:                                               ; preds = %79, %77
  ret i32 0
}

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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 = !{!"double", !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, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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