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

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

@u1 = external dso_local global [6000 x double], align 16
@u2 = external dso_local global [6000 x double], align 16
@v1 = external dso_local global [6000 x double], align 16
@v2 = external dso_local global [6000 x double], align 16
@y = external dso_local global [6000 x double], align 16
@z = external dso_local global [6000 x double], align 16
@x = external dso_local global [6000 x double], align 16
@w = external dso_local global [6000 x double], align 16
@A = external dso_local global [6000 x [6000 x double]], align 16
@B = external dso_local global [6000 x [6000 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() #0 {
  %1 = alloca i32, align 4
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @init_array()
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %6

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

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

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

13:                                               ; preds = %10
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [6000 x [6000 x double]], ptr @A, i64 0, i64 %15
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [6000 x double], ptr %16, i64 0, i64 %18
  %20 = load double, ptr %19, align 8, !tbaa !9
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [6000 x double], ptr @u1, i64 0, i64 %22
  %24 = load double, ptr %23, align 8, !tbaa !9
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [6000 x double], ptr @v1, i64 0, i64 %26
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = call double @llvm.fmuladd.f64(double %24, double %28, double %20)
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [6000 x double], ptr @u2, i64 0, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [6000 x double], ptr @v2, i64 0, i64 %35
  %37 = load double, ptr %36, align 8, !tbaa !9
  %38 = call double @llvm.fmuladd.f64(double %33, double %37, double %29)
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [6000 x double], ptr %41, i64 0, i64 %43
  store double %38, ptr %44, align 8, !tbaa !9
  br label %45

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

48:                                               ; preds = %10
  br label %49

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

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

53:                                               ; preds = %85, %52
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = icmp slt i32 %54, 6000
  br i1 %55, label %56, label %88

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

57:                                               ; preds = %81, %56
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = icmp slt i32 %58, 6000
  br i1 %59, label %60, label %84

60:                                               ; preds = %57
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !9
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %66
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [6000 x double], ptr %67, i64 0, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !9
  %72 = fmul double 1.000000e+00, %71
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [6000 x double], ptr @y, i64 0, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = call double @llvm.fmuladd.f64(double %72, double %76, double %64)
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %79
  store double %77, ptr %80, align 8, !tbaa !9
  br label %81

81:                                               ; preds = %60
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %5, align 4, !tbaa !5
  br label %57, !llvm.loop !14

84:                                               ; preds = %57
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %4, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %4, align 4, !tbaa !5
  br label %53, !llvm.loop !15

88:                                               ; preds = %53
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %105, %88
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = icmp slt i32 %90, 6000
  br i1 %91, label %92, label %108

92:                                               ; preds = %89
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !9
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [6000 x double], ptr @z, i64 0, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = fadd double %96, %100
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %103
  store double %101, ptr %104, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %92
  %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 %89, !llvm.loop !16

108:                                              ; preds = %89
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %141, %108
  %110 = load i32, ptr %4, align 4, !tbaa !5
  %111 = icmp slt i32 %110, 6000
  br i1 %111, label %112, label %144

112:                                              ; preds = %109
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %137, %112
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = icmp slt i32 %114, 6000
  br i1 %115, label %116, label %140

116:                                              ; preds = %113
  %117 = load i32, ptr %4, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [6000 x double], ptr @w, i64 0, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !9
  %121 = load i32, ptr %4, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %122
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [6000 x double], ptr %123, i64 0, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !9
  %128 = fmul double 1.000000e+00, %127
  %129 = load i32, ptr %5, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !9
  %133 = call double @llvm.fmuladd.f64(double %128, double %132, double %120)
  %134 = load i32, ptr %4, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [6000 x double], ptr @w, i64 0, i64 %135
  store double %133, ptr %136, align 8, !tbaa !9
  br label %137

137:                                              ; preds = %116
  %138 = load i32, ptr %5, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %5, align 4, !tbaa !5
  br label %113, !llvm.loop !17

140:                                              ; preds = %113
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %4, align 4, !tbaa !5
  br label %109, !llvm.loop !18

144:                                              ; preds = %109
  %145 = call noalias ptr @fopen(ptr noundef @.str.3, ptr noundef @.str.4)
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %148

147:                                              ; preds = %144
  call void @print_array()
  br label %148

148:                                              ; preds = %147, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #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 = !{!"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 = distinct !{!17, !12}
!18 = distinct !{!18, !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"

@u1 = external dso_local local_unnamed_addr global [6000 x double], align 16
@u2 = external dso_local local_unnamed_addr global [6000 x double], align 16
@v1 = external dso_local local_unnamed_addr global [6000 x double], align 16
@v2 = external dso_local local_unnamed_addr global [6000 x double], align 16
@y = external dso_local local_unnamed_addr global [6000 x double], align 16
@z = external dso_local local_unnamed_addr global [6000 x double], align 16
@x = external dso_local local_unnamed_addr global [6000 x double], align 16
@w = external dso_local local_unnamed_addr global [6000 x double], align 16
@A = external dso_local local_unnamed_addr global [6000 x [6000 x double]], align 16
@B = external dso_local local_unnamed_addr global [6000 x [6000 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() local_unnamed_addr #0 {
  tail call void @init_array()
  br label %vector.ph

vector.ph:                                        ; preds = %middle.block, %0
  %indvars.iv54 = phi i64 [ 0, %0 ], [ %indvars.iv.next55, %middle.block ]
  %1 = getelementptr inbounds [6000 x double], ptr @u2, i64 0, i64 %indvars.iv54
  %2 = load double, ptr %1, align 8, !tbaa !5
  %3 = getelementptr inbounds [6000 x double], ptr @u1, i64 0, i64 %indvars.iv54
  %4 = load double, ptr %3, align 8, !tbaa !5
  %broadcast.splatinsert = insertelement <2 x double> poison, double %4, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert85 = insertelement <2 x double> poison, double %2, i64 0
  %broadcast.splat86 = shufflevector <2 x double> %broadcast.splatinsert85, <2 x double> 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 ]
  %5 = getelementptr inbounds [6000 x [6000 x double]], ptr @A, i64 0, i64 %indvars.iv54, i64 %index
  %6 = getelementptr inbounds i8, ptr %5, i64 16
  %wide.load = load <2 x double>, ptr %5, align 16, !tbaa !5
  %wide.load80 = load <2 x double>, ptr %6, align 16, !tbaa !5
  %7 = getelementptr inbounds [6000 x double], ptr @v1, i64 0, i64 %index
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  %wide.load81 = load <2 x double>, ptr %7, align 16, !tbaa !5
  %wide.load82 = load <2 x double>, ptr %8, align 16, !tbaa !5
  %9 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load81, <2 x double> %wide.load)
  %10 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load82, <2 x double> %wide.load80)
  %11 = getelementptr inbounds [6000 x double], ptr @v2, i64 0, i64 %index
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %wide.load83 = load <2 x double>, ptr %11, align 16, !tbaa !5
  %wide.load84 = load <2 x double>, ptr %12, align 16, !tbaa !5
  %13 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat86, <2 x double> %wide.load83, <2 x double> %9)
  %14 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat86, <2 x double> %wide.load84, <2 x double> %10)
  %15 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv54, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  store <2 x double> %13, ptr %15, align 16, !tbaa !5
  store <2 x double> %14, ptr %16, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %17 = icmp eq i64 %index.next, 6000
  br i1 %17, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond57.not = icmp eq i64 %indvars.iv.next55, 6000
  br i1 %exitcond57.not, label %.preheader40, label %vector.ph, !llvm.loop !13

.preheader40:                                     ; preds = %middle.block, %41
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %41 ], [ 0, %middle.block ]
  %18 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %indvars.iv62
  %.promoted = load double, ptr %18, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %19, %.preheader40
  %indvars.iv58 = phi i64 [ 0, %.preheader40 ], [ %indvars.iv.next59.3, %19 ]
  %20 = phi double [ %.promoted, %.preheader40 ], [ %40, %19 ]
  %21 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv58, i64 %indvars.iv62
  %22 = load double, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds [6000 x double], ptr @y, i64 0, i64 %indvars.iv58
  %24 = load double, ptr %23, align 16, !tbaa !5
  %25 = tail call double @llvm.fmuladd.f64(double %22, double %24, double %20)
  %indvars.iv.next59 = or disjoint i64 %indvars.iv58, 1
  %26 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv.next59, i64 %indvars.iv62
  %27 = load double, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds [6000 x double], ptr @y, i64 0, i64 %indvars.iv.next59
  %29 = load double, ptr %28, align 8, !tbaa !5
  %30 = tail call double @llvm.fmuladd.f64(double %27, double %29, double %25)
  %indvars.iv.next59.1 = or disjoint i64 %indvars.iv58, 2
  %31 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv.next59.1, i64 %indvars.iv62
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds [6000 x double], ptr @y, i64 0, i64 %indvars.iv.next59.1
  %34 = load double, ptr %33, align 16, !tbaa !5
  %35 = tail call double @llvm.fmuladd.f64(double %32, double %34, double %30)
  %indvars.iv.next59.2 = or disjoint i64 %indvars.iv58, 3
  %36 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv.next59.2, i64 %indvars.iv62
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds [6000 x double], ptr @y, i64 0, i64 %indvars.iv.next59.2
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = tail call double @llvm.fmuladd.f64(double %37, double %39, double %35)
  %indvars.iv.next59.3 = add nuw nsw i64 %indvars.iv58, 4
  %exitcond61.not.3 = icmp eq i64 %indvars.iv.next59.3, 6000
  br i1 %exitcond61.not.3, label %41, label %19, !llvm.loop !14

41:                                               ; preds = %19
  store double %40, ptr %18, align 8, !tbaa !5
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next63, 6000
  br i1 %exitcond65.not, label %vector.body91, label %.preheader40, !llvm.loop !15

vector.body91:                                    ; preds = %41, %vector.body91
  %index92 = phi i64 [ %index.next97.1, %vector.body91 ], [ 0, %41 ]
  %42 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %index92
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load93 = load <2 x double>, ptr %42, align 16, !tbaa !5
  %wide.load94 = load <2 x double>, ptr %43, align 16, !tbaa !5
  %44 = getelementptr inbounds [6000 x double], ptr @z, i64 0, i64 %index92
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load95 = load <2 x double>, ptr %44, align 16, !tbaa !5
  %wide.load96 = load <2 x double>, ptr %45, align 16, !tbaa !5
  %46 = fadd <2 x double> %wide.load93, %wide.load95
  %47 = fadd <2 x double> %wide.load94, %wide.load96
  store <2 x double> %46, ptr %42, align 16, !tbaa !5
  store <2 x double> %47, ptr %43, align 16, !tbaa !5
  %index.next97 = or disjoint i64 %index92, 4
  %48 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %index.next97
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %wide.load93.1 = load <2 x double>, ptr %48, align 16, !tbaa !5
  %wide.load94.1 = load <2 x double>, ptr %49, align 16, !tbaa !5
  %50 = getelementptr inbounds [6000 x double], ptr @z, i64 0, i64 %index.next97
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %wide.load95.1 = load <2 x double>, ptr %50, align 16, !tbaa !5
  %wide.load96.1 = load <2 x double>, ptr %51, align 16, !tbaa !5
  %52 = fadd <2 x double> %wide.load93.1, %wide.load95.1
  %53 = fadd <2 x double> %wide.load94.1, %wide.load96.1
  store <2 x double> %52, ptr %48, align 16, !tbaa !5
  store <2 x double> %53, ptr %49, align 16, !tbaa !5
  %index.next97.1 = add nuw nsw i64 %index92, 8
  %54 = icmp eq i64 %index.next97.1, 6000
  br i1 %54, label %.preheader, label %vector.body91, !llvm.loop !16

.preheader:                                       ; preds = %vector.body91, %78
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %78 ], [ 0, %vector.body91 ]
  %55 = getelementptr inbounds [6000 x double], ptr @w, i64 0, i64 %indvars.iv74
  %.promoted48 = load double, ptr %55, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %56, %.preheader
  %indvars.iv70 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next71.3, %56 ]
  %57 = phi double [ %.promoted48, %.preheader ], [ %77, %56 ]
  %58 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv74, i64 %indvars.iv70
  %59 = load double, ptr %58, align 16, !tbaa !5
  %60 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %indvars.iv70
  %61 = load double, ptr %60, align 16, !tbaa !5
  %62 = tail call double @llvm.fmuladd.f64(double %59, double %61, double %57)
  %indvars.iv.next71 = or disjoint i64 %indvars.iv70, 1
  %63 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv74, i64 %indvars.iv.next71
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %indvars.iv.next71
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = tail call double @llvm.fmuladd.f64(double %64, double %66, double %62)
  %indvars.iv.next71.1 = or disjoint i64 %indvars.iv70, 2
  %68 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv74, i64 %indvars.iv.next71.1
  %69 = load double, ptr %68, align 16, !tbaa !5
  %70 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %indvars.iv.next71.1
  %71 = load double, ptr %70, align 16, !tbaa !5
  %72 = tail call double @llvm.fmuladd.f64(double %69, double %71, double %67)
  %indvars.iv.next71.2 = or disjoint i64 %indvars.iv70, 3
  %73 = getelementptr inbounds [6000 x [6000 x double]], ptr @B, i64 0, i64 %indvars.iv74, i64 %indvars.iv.next71.2
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds [6000 x double], ptr @x, i64 0, i64 %indvars.iv.next71.2
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = tail call double @llvm.fmuladd.f64(double %74, double %76, double %72)
  %indvars.iv.next71.3 = add nuw nsw i64 %indvars.iv70, 4
  %exitcond73.not.3 = icmp eq i64 %indvars.iv.next71.3, 6000
  br i1 %exitcond73.not.3, label %78, label %56, !llvm.loop !17

78:                                               ; preds = %56
  store double %77, ptr %55, align 8, !tbaa !5
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next75, 6000
  br i1 %exitcond77.not, label %79, label %.preheader, !llvm.loop !18

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

81:                                               ; preds = %79
  tail call void @print_array()
  br label %82

82:                                               ; preds = %81, %79
  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 nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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 nosync nounwind speculatable willreturn memory(none) }

!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, !11, !12}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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