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

; 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 [2048 x [2048 x double]], align 16
@a = external dso_local global [2048 x [2048 x double]], align 16
@b = external dso_local global [2048 x [2048 x double]], align 16
@t_start = external dso_local global double, align 8
@t_end = external dso_local global double, align 8
@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
  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
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %5

5:                                                ; preds = %49, %0
  %6 = load i32, ptr %2, align 4, !tbaa !5
  %7 = icmp slt i32 %6, 2048
  br i1 %7, label %8, label %52

8:                                                ; preds = %5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %45, %8
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = icmp slt i32 %10, 2048
  br i1 %11, label %12, label %48

12:                                               ; preds = %9
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [2048 x [2048 x double]], ptr @c, i64 0, i64 %14
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [2048 x double], ptr %15, i64 0, i64 %17
  store double 0.000000e+00, ptr %18, align 8, !tbaa !9
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = mul nsw i32 %19, %20
  %22 = sitofp i32 %21 to double
  %23 = fmul double %22, 3.250000e+01
  %24 = fdiv double %23, 0x4150000000000000
  %25 = fadd double 1.000000e+00, %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [2048 x [2048 x double]], ptr @a, i64 0, i64 %27
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [2048 x double], ptr %28, i64 0, i64 %30
  store double %25, ptr %31, align 8, !tbaa !9
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = mul nsw i32 %32, %33
  %35 = sitofp i32 %34 to double
  %36 = fmul double %35, 3.456500e+00
  %37 = fdiv double %36, 0x4150000000000000
  %38 = fadd double 1.000000e+00, %37
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [2048 x [2048 x double]], ptr @b, i64 0, i64 %40
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [2048 x double], ptr %41, i64 0, i64 %43
  store double %38, ptr %44, align 8, !tbaa !9
  br label %45

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

48:                                               ; preds = %9
  br label %49

49:                                               ; preds = %48
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %2, align 4, !tbaa !5
  br label %5, !llvm.loop !13

52:                                               ; preds = %5
  %53 = call double @rtclock()
  store double %53, ptr @t_start, align 8, !tbaa !9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %113, %52
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = icmp slt i32 %55, 2048
  br i1 %56, label %57, label %116

57:                                               ; preds = %54
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %109, %57
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = icmp slt i32 %59, 2048
  br i1 %60, label %61, label %112

61:                                               ; preds = %58
  %62 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %62, ptr %4, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %105, %61
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = icmp slt i32 %64, 2048
  br i1 %65, label %66, label %108

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

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

108:                                              ; preds = %63
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %3, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %3, align 4, !tbaa !5
  br label %58, !llvm.loop !15

112:                                              ; preds = %58
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %2, align 4, !tbaa !5
  br label %54, !llvm.loop !16

116:                                              ; preds = %54
  %117 = call double @rtclock()
  store double %117, ptr @t_end, align 8, !tbaa !9
  %118 = load ptr, ptr @stdout, align 8, !tbaa !17
  %119 = load double, ptr @t_end, align 8, !tbaa !9
  %120 = load double, ptr @t_start, align 8, !tbaa !9
  %121 = fsub double %119, %120
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str.1, double noundef %121) #5
  %123 = call noalias ptr @fopen(ptr noundef @.str.2, ptr noundef @.str.3)
  %124 = icmp ne ptr %123, null
  br i1 %124, label %125, label %153

125:                                              ; preds = %116
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %147, %125
  %127 = load i32, ptr %2, align 4, !tbaa !5
  %128 = icmp slt i32 %127, 2048
  br i1 %128, label %129, label %150

129:                                              ; preds = %126
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %143, %129
  %131 = load i32, ptr %3, align 4, !tbaa !5
  %132 = icmp slt i32 %131, 2048
  br i1 %132, label %133, label %146

133:                                              ; preds = %130
  %134 = load ptr, ptr @stderr, align 8, !tbaa !17
  %135 = load i32, ptr %2, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [2048 x [2048 x double]], ptr @c, i64 0, i64 %136
  %138 = load i32, ptr %3, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [2048 x double], ptr %137, i64 0, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !9
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.4, double noundef %141) #5
  br label %143

143:                                              ; preds = %133
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %3, align 4, !tbaa !5
  br label %130, !llvm.loop !19

146:                                              ; preds = %130
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %2, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %2, align 4, !tbaa !5
  br label %126, !llvm.loop !20

150:                                              ; preds = %126
  %151 = load ptr, ptr @stderr, align 8, !tbaa !17
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %151, ptr noundef @.str.5) #5
  br label %153

153:                                              ; preds = %150, %116
  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 [2048 x [2048 x double]], align 16
@a = external dso_local local_unnamed_addr global [2048 x [2048 x double]], align 16
@b = external dso_local local_unnamed_addr global [2048 x [2048 x double]], align 16
@t_start = external dso_local local_unnamed_addr global double, align 8
@t_end = external dso_local local_unnamed_addr global double, align 8
@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(33554432) @c, i8 0, i64 33554432, 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 3.250000e+01, double 3.250000e+01>
  %5 = fmul <2 x double> %4, <double 0x3E90000000000000, double 0x3E90000000000000>
  %6 = fadd <2 x double> %5, <double 1.000000e+00, double 1.000000e+00>
  %7 = getelementptr inbounds [2048 x [2048 x double]], ptr @a, i64 0, i64 %indvar, i64 %index
  store <2 x double> %6, ptr %7, align 16, !tbaa !5
  %8 = fmul <2 x double> %3, <double 3.456500e+00, double 3.456500e+00>
  %9 = fmul <2 x double> %8, <double 0x3E90000000000000, double 0x3E90000000000000>
  %10 = fadd <2 x double> %9, <double 1.000000e+00, double 1.000000e+00>
  %11 = getelementptr inbounds [2048 x [2048 x double]], ptr @b, i64 0, i64 %indvar, i64 %index
  store <2 x double> %10, ptr %11, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %12 = icmp eq i64 %index.next, 2048
  br i1 %12, label %middle.block, label %vector.body, !llvm.loop !9

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

13:                                               ; preds = %middle.block
  %14 = tail call double @rtclock()
  store double %14, ptr @t_start, align 8, !tbaa !5
  br label %.preheader43

.preheader43:                                     ; preds = %13, %42
  %indvars.iv63 = phi i64 [ 0, %13 ], [ %indvars.iv.next64, %42 ]
  br label %.preheader42

.preheader42:                                     ; preds = %.preheader43, %.loopexit
  %indvars.iv55 = phi i64 [ 0, %.preheader43 ], [ %indvars.iv.next56, %.loopexit ]
  %15 = sub nsw i64 2048, %indvars.iv55
  %16 = getelementptr inbounds [2048 x [2048 x double]], ptr @a, i64 0, i64 %indvars.iv63, i64 %indvars.iv55
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds [2048 x [2048 x double]], ptr @b, i64 0, i64 %indvars.iv63, i64 %indvars.iv55
  %19 = load double, ptr %18, align 8, !tbaa !5
  %min.iters.check = icmp ult i64 %15, 4
  br i1 %min.iters.check, label %scalar.ph76.preheader, label %vector.ph77

vector.ph77:                                      ; preds = %.preheader42
  %n.vec = and i64 %15, -4
  %ind.end = add i64 %indvars.iv55, %n.vec
  %broadcast.splatinsert84 = insertelement <2 x double> poison, double %19, i64 0
  %broadcast.splat85 = shufflevector <2 x double> %broadcast.splatinsert84, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert86 = insertelement <2 x double> poison, double %17, i64 0
  %broadcast.splat87 = shufflevector <2 x double> %broadcast.splatinsert86, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body79

vector.body79:                                    ; preds = %vector.body79, %vector.ph77
  %index80 = phi i64 [ 0, %vector.ph77 ], [ %index.next90, %vector.body79 ]
  %offset.idx = add i64 %indvars.iv55, %index80
  %20 = getelementptr inbounds [2048 x [2048 x double]], ptr @b, i64 0, i64 %indvars.iv63, i64 %offset.idx
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %wide.load = load <2 x double>, ptr %20, align 8, !tbaa !5
  %wide.load81 = load <2 x double>, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds [2048 x [2048 x double]], ptr @a, i64 0, i64 %indvars.iv63, i64 %offset.idx
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %wide.load82 = load <2 x double>, ptr %22, align 8, !tbaa !5
  %wide.load83 = load <2 x double>, ptr %23, align 8, !tbaa !5
  %24 = fmul <2 x double> %broadcast.splat85, %wide.load82
  %25 = fmul <2 x double> %broadcast.splat85, %wide.load83
  %26 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat87, <2 x double> %wide.load, <2 x double> %24)
  %27 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat87, <2 x double> %wide.load81, <2 x double> %25)
  %28 = getelementptr inbounds [2048 x [2048 x double]], ptr @c, i64 0, i64 %indvars.iv55, i64 %offset.idx
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load88 = load <2 x double>, ptr %28, align 8, !tbaa !5
  %wide.load89 = load <2 x double>, ptr %29, align 8, !tbaa !5
  %30 = fadd <2 x double> %wide.load88, %26
  %31 = fadd <2 x double> %wide.load89, %27
  store <2 x double> %30, ptr %28, align 8, !tbaa !5
  store <2 x double> %31, ptr %29, align 8, !tbaa !5
  %index.next90 = add nuw i64 %index80, 4
  %32 = icmp eq i64 %index.next90, %n.vec
  br i1 %32, label %middle.block75, label %vector.body79, !llvm.loop !14

middle.block75:                                   ; preds = %vector.body79
  %cmp.n = icmp eq i64 %15, %n.vec
  br i1 %cmp.n, label %.loopexit, label %scalar.ph76.preheader

scalar.ph76.preheader:                            ; preds = %middle.block75, %.preheader42
  %indvars.iv57.ph = phi i64 [ %indvars.iv55, %.preheader42 ], [ %ind.end, %middle.block75 ]
  br label %scalar.ph76

scalar.ph76:                                      ; preds = %scalar.ph76.preheader, %scalar.ph76
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %scalar.ph76 ], [ %indvars.iv57.ph, %scalar.ph76.preheader ]
  %33 = getelementptr inbounds [2048 x [2048 x double]], ptr @b, i64 0, i64 %indvars.iv63, i64 %indvars.iv57
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds [2048 x [2048 x double]], ptr @a, i64 0, i64 %indvars.iv63, i64 %indvars.iv57
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = fmul double %19, %36
  %38 = tail call double @llvm.fmuladd.f64(double %17, double %34, double %37)
  %39 = getelementptr inbounds [2048 x [2048 x double]], ptr @c, i64 0, i64 %indvars.iv55, i64 %indvars.iv57
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = fadd double %40, %38
  store double %41, ptr %39, align 8, !tbaa !5
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %exitcond60.not = icmp eq i64 %indvars.iv.next58, 2048
  br i1 %exitcond60.not, label %.loopexit, label %scalar.ph76, !llvm.loop !15

.loopexit:                                        ; preds = %scalar.ph76, %middle.block75
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %exitcond62.not = icmp eq i64 %indvars.iv.next56, 2048
  br i1 %exitcond62.not, label %42, label %.preheader42, !llvm.loop !16

42:                                               ; preds = %.loopexit
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next64, 2048
  br i1 %exitcond66.not, label %43, label %.preheader43, !llvm.loop !17

43:                                               ; preds = %42
  %44 = tail call double @rtclock()
  store double %44, ptr @t_end, align 8, !tbaa !5
  %45 = load ptr, ptr @stdout, align 8, !tbaa !18
  %46 = load double, ptr @t_start, align 8, !tbaa !5
  %47 = fsub double %44, %46
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.1, double noundef %47) #5
  %49 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3)
  %.not = icmp eq ptr %49, null
  br i1 %.not, label %59, label %.preheader

.preheader:                                       ; preds = %43, %55
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %55 ], [ 0, %43 ]
  br label %50

50:                                               ; preds = %.preheader, %50
  %indvars.iv67 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next68, %50 ]
  %51 = load ptr, ptr @stderr, align 8, !tbaa !18
  %52 = getelementptr inbounds [2048 x [2048 x double]], ptr @c, i64 0, i64 %indvars.iv71, i64 %indvars.iv67
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.4, double noundef %53) #6
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond70.not = icmp eq i64 %indvars.iv.next68, 2048
  br i1 %exitcond70.not, label %55, label %50, !llvm.loop !20

55:                                               ; preds = %50
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next72, 2048
  br i1 %exitcond74.not, label %56, label %.preheader, !llvm.loop !21

56:                                               ; preds = %55
  %57 = load ptr, ptr @stderr, align 8, !tbaa !18
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.5) #6
  br label %59

59:                                               ; preds = %56, %43
  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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { 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, !11, !12}
!15 = distinct !{!15, !10, !12, !11}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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