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

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

@c = external dso_local global [2000 x [2000 x double]], align 16
@b = external dso_local global [2000 x [2000 x double]], align 16
@a = external dso_local global [2000 x [2000 x double]], align 16
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local double @rtclock() #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 double @llvm.fmuladd.f64(double, double, double) #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
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %7

7:                                                ; preds = %43, %0
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = icmp slt i32 %8, 2000
  br i1 %9, label %10, label %46

10:                                               ; preds = %7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %39, %10
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = icmp slt i32 %12, 2000
  br i1 %13, label %14, label %42

14:                                               ; preds = %11
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %16
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [2000 x double], ptr %17, i64 0, i64 %19
  store double 0.000000e+00, ptr %20, align 8, !tbaa !9
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = mul nsw i32 %21, %22
  %24 = sitofp i32 %23 to double
  %25 = fmul double %24, 5.000000e-01
  %26 = fdiv double %25, 2.000000e+03
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [2000 x [2000 x double]], ptr @b, i64 0, i64 %28
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [2000 x double], ptr %29, i64 0, i64 %31
  store double %26, ptr %32, align 8, !tbaa !9
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %34
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [2000 x double], ptr %35, i64 0, i64 %37
  store double %26, ptr %38, align 8, !tbaa !9
  br label %39

39:                                               ; preds = %14
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !5
  br label %11, !llvm.loop !11

42:                                               ; preds = %11
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %2, align 4, !tbaa !5
  br label %7, !llvm.loop !13

46:                                               ; preds = %7
  %47 = call double @rtclock()
  store double %47, ptr %5, align 8, !tbaa !9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %136, %46
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = icmp slt i32 %49, 2000
  br i1 %50, label %51, label %139

51:                                               ; preds = %48
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %132, %51
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = icmp slt i32 %53, 2000
  br i1 %54, label %55, label %135

55:                                               ; preds = %52
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %106, %55
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sub nsw i32 %58, 1
  %60 = icmp slt i32 %57, %59
  br i1 %60, label %61, label %109

61:                                               ; preds = %56
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %63
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [2000 x double], ptr %64, i64 0, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !9
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [2000 x [2000 x double]], ptr @b, i64 0, i64 %70
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [2000 x double], ptr %71, i64 0, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = load i32, ptr %2, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %77
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [2000 x double], ptr %78, i64 0, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !9
  %83 = call double @llvm.fmuladd.f64(double %68, double %75, double %82)
  store double %83, ptr %81, align 8, !tbaa !9
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %85
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [2000 x double], ptr %86, i64 0, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [2000 x [2000 x double]], ptr @b, i64 0, i64 %92
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [2000 x double], ptr %93, i64 0, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = load i32, ptr %2, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %99
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [2000 x double], ptr %100, i64 0, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = call double @llvm.fmuladd.f64(double %90, double %97, double %104)
  store double %105, ptr %103, align 8, !tbaa !9
  br label %106

106:                                              ; preds = %61
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %4, align 4, !tbaa !5
  br label %56, !llvm.loop !14

109:                                              ; preds = %56
  %110 = load i32, ptr %3, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %111
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2000 x double], ptr %112, i64 0, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !9
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [2000 x [2000 x double]], ptr @b, i64 0, i64 %118
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [2000 x double], ptr %119, i64 0, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !9
  %124 = load i32, ptr %2, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %125
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [2000 x double], ptr %126, i64 0, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = call double @llvm.fmuladd.f64(double %116, double %123, double %130)
  store double %131, ptr %129, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %109
  %133 = load i32, ptr %3, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %3, align 4, !tbaa !5
  br label %52, !llvm.loop !15

135:                                              ; preds = %52
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %2, align 4, !tbaa !5
  br label %48, !llvm.loop !16

139:                                              ; preds = %48
  %140 = call double @rtclock()
  store double %140, ptr %6, align 8, !tbaa !9
  %141 = load ptr, ptr @stdout, align 8, !tbaa !17
  %142 = load double, ptr %6, align 8, !tbaa !9
  %143 = load double, ptr %5, align 8, !tbaa !9
  %144 = fsub double %142, %143
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef @.str.1, double noundef %144) #5
  %146 = call noalias ptr @fopen(ptr noundef @.str.2, ptr noundef @.str.3)
  %147 = icmp ne ptr %146, null
  br i1 %147, label %148, label %176

148:                                              ; preds = %139
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %172, %148
  %150 = load i32, ptr %2, align 4, !tbaa !5
  %151 = icmp slt i32 %150, 2000
  br i1 %151, label %152, label %175

152:                                              ; preds = %149
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %166, %152
  %154 = load i32, ptr %3, align 4, !tbaa !5
  %155 = icmp slt i32 %154, 2000
  br i1 %155, label %156, label %169

156:                                              ; preds = %153
  %157 = load ptr, ptr @stderr, align 8, !tbaa !17
  %158 = load i32, ptr %2, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %159
  %161 = load i32, ptr %3, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [2000 x double], ptr %160, i64 0, i64 %162
  %164 = load double, ptr %163, align 8, !tbaa !9
  %165 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.4, double noundef %164) #5
  br label %166

166:                                              ; preds = %156
  %167 = load i32, ptr %3, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %3, align 4, !tbaa !5
  br label %153, !llvm.loop !19

169:                                              ; preds = %153
  %170 = load ptr, ptr @stderr, align 8, !tbaa !17
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.5) #5
  br label %172

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

175:                                              ; preds = %149
  br label %176

176:                                              ; preds = %175, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr 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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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

@c = external dso_local local_unnamed_addr global [2000 x [2000 x double]], align 16
@b = external dso_local local_unnamed_addr global [2000 x [2000 x double]], align 16
@a = external dso_local local_unnamed_addr global [2000 x [2000 x double]], align 16
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local double @rtclock() 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() local_unnamed_addr #0 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32000000) @c, i8 0, i64 32000000, i1 false), !tbaa !5
  br label %vector.ph

vector.ph:                                        ; preds = %middle.block, %0
  %indvar = phi i64 [ 0, %0 ], [ %indvar.next, %middle.block ]
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %indvar, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %1 = mul nuw nsw <2 x i64> %vec.ind, %broadcast.splat
  %2 = trunc <2 x i64> %1 to <2 x i32>
  %3 = uitofp <2 x i32> %2 to <2 x double>
  %4 = fmul <2 x double> %3, <double 5.000000e-01, double 5.000000e-01>
  %5 = fdiv <2 x double> %4, <double 2.000000e+03, double 2.000000e+03>
  %6 = getelementptr inbounds [2000 x [2000 x double]], ptr @b, i64 0, i64 %indvar, i64 %index
  store <2 x double> %5, ptr %6, align 16, !tbaa !5
  %7 = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %indvar, i64 %index
  store <2 x double> %5, ptr %7, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %8 = icmp eq i64 %index.next, 2000
  br i1 %8, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %indvar.next = add nuw nsw i64 %indvar, 1
  %exitcond61.not = icmp eq i64 %indvar.next, 2000
  br i1 %exitcond61.not, label %9, label %vector.ph, !llvm.loop !13

9:                                                ; preds = %middle.block
  %10 = tail call double @rtclock()
  br label %.preheader50

.preheader50:                                     ; preds = %9, %30
  %indvars.iv72 = phi i64 [ 0, %9 ], [ %indvars.iv.next73, %30 ]
  br label %.preheader49

.preheader49:                                     ; preds = %.preheader50, %._crit_edge
  %indvars.iv68 = phi i64 [ 0, %.preheader50 ], [ %indvars.iv.next69, %._crit_edge ]
  %indvars.iv65 = phi i32 [ -1, %.preheader50 ], [ %indvars.iv.next66, %._crit_edge ]
  %11 = icmp ugt i64 %indvars.iv68, 1
  %12 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %indvars.iv72, i64 %indvars.iv68
  br i1 %11, label %.lr.ph, label %.preheader49.._crit_edge_crit_edge

.preheader49.._crit_edge_crit_edge:               ; preds = %.preheader49
  %.phi.trans.insert = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %indvars.iv68, i64 %indvars.iv68
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !5
  %.phi.trans.insert84 = getelementptr inbounds [2000 x [2000 x double]], ptr @b, i64 0, i64 %indvars.iv72, i64 %indvars.iv68
  %.pre85 = load double, ptr %.phi.trans.insert84, align 8, !tbaa !5
  %.pre87 = load double, ptr %12, align 8, !tbaa !5
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader49
  %13 = getelementptr inbounds [2000 x [2000 x double]], ptr @b, i64 0, i64 %indvars.iv72, i64 %indvars.iv68
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %indvars.iv68, i64 %indvars.iv68
  %16 = load double, ptr %15, align 8, !tbaa !5
  %wide.trip.count = zext i32 %indvars.iv65 to i64
  br label %17

17:                                               ; preds = %.lr.ph, %17
  %indvars.iv62 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next63, %17 ]
  %18 = getelementptr inbounds [2000 x [2000 x double]], ptr @a, i64 0, i64 %indvars.iv68, i64 %indvars.iv62
  %19 = load double, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %indvars.iv72, i64 %indvars.iv62
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = tail call double @llvm.fmuladd.f64(double %19, double %14, double %21)
  store double %22, ptr %20, align 8, !tbaa !5
  %23 = load double, ptr %12, align 8, !tbaa !5
  %24 = tail call double @llvm.fmuladd.f64(double %16, double %14, double %23)
  store double %24, ptr %12, align 8, !tbaa !5
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count
  br i1 %exitcond67.not, label %._crit_edge, label %17, !llvm.loop !14

._crit_edge:                                      ; preds = %17, %.preheader49.._crit_edge_crit_edge
  %25 = phi double [ %.pre87, %.preheader49.._crit_edge_crit_edge ], [ %24, %17 ]
  %26 = phi double [ %.pre85, %.preheader49.._crit_edge_crit_edge ], [ %14, %17 ]
  %27 = phi double [ %.pre, %.preheader49.._crit_edge_crit_edge ], [ %16, %17 ]
  %28 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %indvars.iv72, i64 %indvars.iv68
  %29 = tail call double @llvm.fmuladd.f64(double %27, double %26, double %25)
  store double %29, ptr %28, align 8, !tbaa !5
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %indvars.iv.next66 = add nsw i32 %indvars.iv65, 1
  %exitcond71.not = icmp eq i64 %indvars.iv.next69, 2000
  br i1 %exitcond71.not, label %30, label %.preheader49, !llvm.loop !15

30:                                               ; preds = %._crit_edge
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next73, 2000
  br i1 %exitcond75.not, label %31, label %.preheader50, !llvm.loop !16

31:                                               ; preds = %30
  %32 = tail call double @rtclock()
  %33 = load ptr, ptr @stdout, align 8, !tbaa !17
  %34 = fsub double %32, %10
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.1, double noundef %34) #4
  %36 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3)
  %.not = icmp eq ptr %36, null
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %31, %42
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %42 ], [ 0, %31 ]
  br label %37

37:                                               ; preds = %.preheader, %37
  %indvars.iv76 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next77, %37 ]
  %38 = load ptr, ptr @stderr, align 8, !tbaa !17
  %39 = getelementptr inbounds [2000 x [2000 x double]], ptr @c, i64 0, i64 %indvars.iv80, i64 %indvars.iv76
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.4, double noundef %40) #5
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next77, 2000
  br i1 %exitcond79.not, label %42, label %37, !llvm.loop !19

42:                                               ; preds = %37
  %43 = load ptr, ptr @stderr, align 8, !tbaa !17
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.5) #5
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next81, 2000
  br i1 %exitcond83.not, label %.loopexit, label %.preheader, !llvm.loop !20

.loopexit:                                        ; preds = %42, %31
  ret i32 0
}

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

; 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) }
attributes #4 = { nounwind }
attributes #5 = { cold 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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