; LLVM IR from bondhugula/pluto :: examples/fdtd-2d (fdtd-2d)

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

@ey = external dso_local global [2049 x [2048 x double]], align 16
@ex = external dso_local global [2048 x [2049 x double]], align 16
@hz = external dso_local global [2048 x [2048 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

9:                                                ; preds = %181, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = icmp slt i32 %10, 128
  br i1 %11, label %12, label %184

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

13:                                               ; preds = %22, %12
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = icmp slt i32 %14, 2048
  br i1 %15, label %16, label %25

16:                                               ; preds = %13
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sitofp i32 %17 to double
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [2048 x double], ptr @ey, i64 0, i64 %20
  store double %18, ptr %21, align 8, !tbaa !9
  br label %22

22:                                               ; preds = %16
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %4, align 4, !tbaa !5
  br label %13, !llvm.loop !11

25:                                               ; preds = %13
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %68, %25
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 2048
  br i1 %28, label %29, label %71

29:                                               ; preds = %26
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %64, %29
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 2048
  br i1 %32, label %33, label %67

33:                                               ; preds = %30
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [2049 x [2048 x double]], ptr @ey, i64 0, i64 %35
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [2048 x double], ptr %36, i64 0, i64 %38
  %40 = load double, ptr %39, align 8, !tbaa !9
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %42
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [2048 x double], ptr %43, i64 0, i64 %45
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sub nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %50
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2048 x double], ptr %51, i64 0, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !9
  %56 = fsub double %47, %55
  %57 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %56, double %40)
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [2049 x [2048 x double]], ptr @ey, i64 0, i64 %59
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2048 x double], ptr %60, i64 0, i64 %62
  store double %57, ptr %63, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %33
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  br label %30, !llvm.loop !13

67:                                               ; preds = %30
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %3, align 4, !tbaa !5
  br label %26, !llvm.loop !14

71:                                               ; preds = %26
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %114, %71
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = icmp slt i32 %73, 2048
  br i1 %74, label %75, label %117

75:                                               ; preds = %72
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %110, %75
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = icmp slt i32 %77, 2048
  br i1 %78, label %79, label %113

79:                                               ; preds = %76
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %81
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [2049 x double], ptr %82, i64 0, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !9
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %88
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [2048 x double], ptr %89, i64 0, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !9
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %95
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2048 x double], ptr %96, i64 0, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !9
  %102 = fsub double %93, %101
  %103 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %102, double %86)
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %105
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [2049 x double], ptr %106, i64 0, i64 %108
  store double %103, ptr %109, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %79
  %111 = load i32, ptr %4, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %4, align 4, !tbaa !5
  br label %76, !llvm.loop !15

113:                                              ; preds = %76
  br label %114

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

117:                                              ; preds = %72
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %177, %117
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = icmp slt i32 %119, 2048
  br i1 %120, label %121, label %180

121:                                              ; preds = %118
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %173, %121
  %123 = load i32, ptr %4, align 4, !tbaa !5
  %124 = icmp slt i32 %123, 2048
  br i1 %124, label %125, label %176

125:                                              ; preds = %122
  %126 = load i32, ptr %3, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %127
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [2048 x double], ptr %128, i64 0, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !9
  %133 = load i32, ptr %3, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %134
  %136 = load i32, ptr %4, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [2049 x double], ptr %135, i64 0, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !9
  %141 = load i32, ptr %3, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %142
  %144 = load i32, ptr %4, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [2049 x double], ptr %143, i64 0, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !9
  %148 = fsub double %140, %147
  %149 = load i32, ptr %3, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [2049 x [2048 x double]], ptr @ey, i64 0, i64 %151
  %153 = load i32, ptr %4, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [2048 x double], ptr %152, i64 0, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !9
  %157 = fadd double %148, %156
  %158 = load i32, ptr %3, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [2049 x [2048 x double]], ptr @ey, i64 0, i64 %159
  %161 = load i32, ptr %4, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [2048 x double], ptr %160, i64 0, i64 %162
  %164 = load double, ptr %163, align 8, !tbaa !9
  %165 = fsub double %157, %164
  %166 = call double @llvm.fmuladd.f64(double 0xBFE6666666666666, double %165, double %132)
  %167 = load i32, ptr %3, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %168
  %170 = load i32, ptr %4, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [2048 x double], ptr %169, i64 0, i64 %171
  store double %166, ptr %172, align 8, !tbaa !9
  br label %173

173:                                              ; preds = %125
  %174 = load i32, ptr %4, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %4, align 4, !tbaa !5
  br label %122, !llvm.loop !17

176:                                              ; preds = %122
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %3, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %3, align 4, !tbaa !5
  br label %118, !llvm.loop !18

180:                                              ; preds = %118
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !19

184:                                              ; preds = %9
  %185 = call noalias ptr @fopen(ptr noundef @.str.3, ptr noundef @.str.4)
  %186 = icmp ne ptr %185, null
  br i1 %186, label %187, label %188

187:                                              ; preds = %184
  call void @print_array()
  br label %188

188:                                              ; preds = %187, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  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 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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}
!19 = distinct !{!19, !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"

@ey = external dso_local local_unnamed_addr global [2049 x [2048 x double]], align 16
@ex = external dso_local local_unnamed_addr global [2048 x [2049 x double]], align 16
@hz = external dso_local local_unnamed_addr global [2048 x [2048 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  tail call void @init_array()
  br label %vector.ph129

vector.ph129:                                     ; preds = %72, %0
  %.063 = phi i32 [ 0, %0 ], [ %73, %72 ]
  %1 = uitofp nneg i32 %.063 to double
  %broadcast.splatinsert = insertelement <2 x double> poison, double %1, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body131

vector.body131:                                   ; preds = %vector.body131, %vector.ph129
  %index132 = phi i64 [ 0, %vector.ph129 ], [ %index.next133.3, %vector.body131 ]
  %2 = getelementptr inbounds [2048 x double], ptr @ey, i64 0, i64 %index132
  %3 = getelementptr inbounds i8, ptr %2, i64 16
  store <2 x double> %broadcast.splat, ptr %2, align 16, !tbaa !5
  store <2 x double> %broadcast.splat, ptr %3, align 16, !tbaa !5
  %index.next133 = or disjoint i64 %index132, 4
  %4 = getelementptr inbounds [2048 x double], ptr @ey, i64 0, i64 %index.next133
  %5 = getelementptr inbounds i8, ptr %4, i64 16
  store <2 x double> %broadcast.splat, ptr %4, align 16, !tbaa !5
  store <2 x double> %broadcast.splat, ptr %5, align 16, !tbaa !5
  %index.next133.1 = or disjoint i64 %index132, 8
  %6 = getelementptr inbounds [2048 x double], ptr @ey, i64 0, i64 %index.next133.1
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  store <2 x double> %broadcast.splat, ptr %6, align 16, !tbaa !5
  store <2 x double> %broadcast.splat, ptr %7, align 16, !tbaa !5
  %index.next133.2 = or disjoint i64 %index132, 12
  %8 = getelementptr inbounds [2048 x double], ptr @ey, i64 0, i64 %index.next133.2
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  store <2 x double> %broadcast.splat, ptr %8, align 16, !tbaa !5
  store <2 x double> %broadcast.splat, ptr %9, align 16, !tbaa !5
  %index.next133.3 = add nuw nsw i64 %index132, 16
  %10 = icmp eq i64 %index.next133.3, 2048
  br i1 %10, label %.preheader51, label %vector.body131, !llvm.loop !9

.preheader51:                                     ; preds = %vector.body131, %middle.block114
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %middle.block114 ], [ 1, %vector.body131 ]
  %11 = add nsw i64 %indvars.iv69, -1
  br label %vector.body118

vector.body118:                                   ; preds = %vector.body118, %.preheader51
  %index119 = phi i64 [ 0, %.preheader51 ], [ %index.next126, %vector.body118 ]
  %12 = getelementptr inbounds [2049 x [2048 x double]], ptr @ey, i64 0, i64 %indvars.iv69, i64 %index119
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %wide.load120 = load <2 x double>, ptr %12, align 16, !tbaa !5
  %wide.load121 = load <2 x double>, ptr %13, align 16, !tbaa !5
  %14 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %indvars.iv69, i64 %index119
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %wide.load122 = load <2 x double>, ptr %14, align 16, !tbaa !5
  %wide.load123 = load <2 x double>, ptr %15, align 16, !tbaa !5
  %16 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %11, i64 %index119
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %wide.load124 = load <2 x double>, ptr %16, align 16, !tbaa !5
  %wide.load125 = load <2 x double>, ptr %17, align 16, !tbaa !5
  %18 = fsub <2 x double> %wide.load122, %wide.load124
  %19 = fsub <2 x double> %wide.load123, %wide.load125
  %20 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %18, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> %wide.load120)
  %21 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> %wide.load121)
  store <2 x double> %20, ptr %12, align 16, !tbaa !5
  store <2 x double> %21, ptr %13, align 16, !tbaa !5
  %index.next126 = add nuw i64 %index119, 4
  %22 = icmp eq i64 %index.next126, 2048
  br i1 %22, label %middle.block114, label %vector.body118, !llvm.loop !13

middle.block114:                                  ; preds = %vector.body118
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond72.not = icmp eq i64 %indvars.iv.next70, 2048
  br i1 %exitcond72.not, label %vector.ph101, label %.preheader51, !llvm.loop !14

vector.ph101:                                     ; preds = %middle.block114, %.loopexit134
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %.loopexit134 ], [ 0, %middle.block114 ]
  %.phi.trans.insert = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %indvars.iv77, i64 0
  %.pre = load double, ptr %.phi.trans.insert, align 16, !tbaa !5
  %vector.recur.init105 = insertelement <2 x double> poison, double %.pre, i64 1
  br label %vector.body103

vector.body103:                                   ; preds = %vector.body103, %vector.ph101
  %index104 = phi i64 [ 0, %vector.ph101 ], [ %index.next111, %vector.body103 ]
  %vector.recur106 = phi <2 x double> [ %vector.recur.init105, %vector.ph101 ], [ %wide.load110, %vector.body103 ]
  %offset.idx = or disjoint i64 %index104, 1
  %23 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %indvars.iv77, i64 %offset.idx
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %wide.load107 = load <2 x double>, ptr %23, align 8, !tbaa !5
  %wide.load108 = load <2 x double>, ptr %24, align 8, !tbaa !5
  %25 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %indvars.iv77, i64 %offset.idx
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %wide.load109 = load <2 x double>, ptr %25, align 8, !tbaa !5
  %wide.load110 = load <2 x double>, ptr %26, align 8, !tbaa !5
  %27 = shufflevector <2 x double> %vector.recur106, <2 x double> %wide.load109, <2 x i32> <i32 1, i32 2>
  %28 = shufflevector <2 x double> %wide.load109, <2 x double> %wide.load110, <2 x i32> <i32 1, i32 2>
  %29 = fsub <2 x double> %wide.load109, %27
  %30 = fsub <2 x double> %wide.load110, %28
  %31 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %29, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> %wide.load107)
  %32 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %30, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> %wide.load108)
  store <2 x double> %31, ptr %23, align 8, !tbaa !5
  store <2 x double> %32, ptr %24, align 8, !tbaa !5
  %index.next111 = add nuw i64 %index104, 4
  %33 = icmp eq i64 %index.next111, 2044
  br i1 %33, label %.loopexit134, label %vector.body103, !llvm.loop !15

.loopexit134:                                     ; preds = %vector.body103
  %vector.recur.extract112 = extractelement <2 x double> %wide.load110, i64 1
  %34 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %indvars.iv77, i64 2045
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %indvars.iv77, i64 2045
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = fsub double %37, %vector.recur.extract112
  %39 = tail call double @llvm.fmuladd.f64(double %38, double -5.000000e-01, double %35)
  store double %39, ptr %34, align 8, !tbaa !5
  %40 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %indvars.iv77, i64 2046
  %41 = load double, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %indvars.iv77, i64 2046
  %43 = load double, ptr %42, align 16, !tbaa !5
  %44 = fsub double %43, %37
  %45 = tail call double @llvm.fmuladd.f64(double %44, double -5.000000e-01, double %41)
  store double %45, ptr %40, align 8, !tbaa !5
  %46 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %indvars.iv77, i64 2047
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %indvars.iv77, i64 2047
  %49 = load double, ptr %48, align 8, !tbaa !5
  %50 = fsub double %49, %43
  %51 = tail call double @llvm.fmuladd.f64(double %50, double -5.000000e-01, double %47)
  store double %51, ptr %46, align 8, !tbaa !5
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next78, 2048
  br i1 %exitcond80.not, label %.preheader, label %vector.ph101, !llvm.loop !16

.preheader:                                       ; preds = %.loopexit134, %middle.block
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %middle.block ], [ 0, %.loopexit134 ]
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %.phi.trans.insert90 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %indvars.iv85, i64 0
  %.pre91 = load double, ptr %.phi.trans.insert90, align 8, !tbaa !5
  %vector.recur.init = insertelement <2 x double> poison, double %.pre91, i64 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.preheader
  %index = phi i64 [ 0, %.preheader ], [ %index.next, %vector.body ]
  %vector.recur = phi <2 x double> [ %vector.recur.init, %.preheader ], [ %wide.load94, %vector.body ]
  %52 = getelementptr inbounds [2048 x [2048 x double]], ptr @hz, i64 0, i64 %indvars.iv85, i64 %index
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %wide.load = load <2 x double>, ptr %52, align 16, !tbaa !5
  %wide.load92 = load <2 x double>, ptr %53, align 16, !tbaa !5
  %54 = or disjoint i64 %index, 1
  %55 = getelementptr inbounds [2048 x [2049 x double]], ptr @ex, i64 0, i64 %indvars.iv85, i64 %54
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load93 = load <2 x double>, ptr %55, align 8, !tbaa !5
  %wide.load94 = load <2 x double>, ptr %56, align 8, !tbaa !5
  %57 = shufflevector <2 x double> %vector.recur, <2 x double> %wide.load93, <2 x i32> <i32 1, i32 2>
  %58 = shufflevector <2 x double> %wide.load93, <2 x double> %wide.load94, <2 x i32> <i32 1, i32 2>
  %59 = fsub <2 x double> %wide.load93, %57
  %60 = fsub <2 x double> %wide.load94, %58
  %61 = getelementptr inbounds [2049 x [2048 x double]], ptr @ey, i64 0, i64 %indvars.iv.next86, i64 %index
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %wide.load95 = load <2 x double>, ptr %61, align 16, !tbaa !5
  %wide.load96 = load <2 x double>, ptr %62, align 16, !tbaa !5
  %63 = fadd <2 x double> %59, %wide.load95
  %64 = fadd <2 x double> %60, %wide.load96
  %65 = getelementptr inbounds [2049 x [2048 x double]], ptr @ey, i64 0, i64 %indvars.iv85, i64 %index
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  %wide.load97 = load <2 x double>, ptr %65, align 16, !tbaa !5
  %wide.load98 = load <2 x double>, ptr %66, align 16, !tbaa !5
  %67 = fsub <2 x double> %63, %wide.load97
  %68 = fsub <2 x double> %64, %wide.load98
  %69 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> <double 0xBFE6666666666666, double 0xBFE6666666666666>, <2 x double> %wide.load)
  %70 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %68, <2 x double> <double 0xBFE6666666666666, double 0xBFE6666666666666>, <2 x double> %wide.load92)
  store <2 x double> %69, ptr %52, align 16, !tbaa !5
  store <2 x double> %70, ptr %53, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %71 = icmp eq i64 %index.next, 2048
  br i1 %71, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %exitcond88.not = icmp eq i64 %indvars.iv.next86, 2048
  br i1 %exitcond88.not, label %72, label %.preheader, !llvm.loop !18

72:                                               ; preds = %middle.block
  %73 = add nuw nsw i32 %.063, 1
  %exitcond89.not = icmp eq i32 %73, 128
  br i1 %exitcond89.not, label %74, label %vector.ph129, !llvm.loop !19

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

76:                                               ; preds = %74
  tail call void @print_array()
  br label %77

77:                                               ; preds = %76, %74
  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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #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, !11, !12}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !11, !12}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !11, !12}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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