; LLVM IR from bonamarton/phys_num :: RK4_attractors (RK4adaptiveAttractors)

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

; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: nounwind uwtable
define dso_local void @RK4basic(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, double noundef %4, double noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store double %4, ptr %12, align 8, !tbaa !11
  store double %5, ptr %13, align 8, !tbaa !11
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %22 = load i32, ptr %11, align 4, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = call ptr @llvm.stacksave.p0()
  store ptr %24, ptr %16, align 8
  %25 = alloca double, i64 %23, align 16
  store i64 %23, ptr %17, align 8
  %26 = load i32, ptr %11, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = alloca double, i64 %27, align 16
  store i64 %27, ptr %18, align 8
  %29 = load i32, ptr %11, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = alloca double, i64 %30, align 16
  store i64 %30, ptr %19, align 8
  %32 = load i32, ptr %11, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = alloca double, i64 %33, align 16
  store i64 %33, ptr %20, align 8
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = alloca double, i64 %36, align 16
  store i64 %36, ptr %21, align 8
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %54, %7
  %39 = load i32, ptr %15, align 4, !tbaa !9
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %57

42:                                               ; preds = %38
  %43 = load double, ptr %13, align 8, !tbaa !11
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = load double, ptr %12, align 8, !tbaa !11
  %48 = load i32, ptr %15, align 4, !tbaa !9
  %49 = call double %44(ptr noundef %45, ptr noundef %46, double noundef %47, i32 noundef %48)
  %50 = fmul double %43, %49
  %51 = load i32, ptr %15, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %25, i64 %52
  store double %50, ptr %53, align 8, !tbaa !11
  br label %54

54:                                               ; preds = %42
  %55 = load i32, ptr %15, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %15, align 4, !tbaa !9
  br label %38, !llvm.loop !13

57:                                               ; preds = %38
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %76, %57
  %59 = load i32, ptr %15, align 4, !tbaa !9
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %79

62:                                               ; preds = %58
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = load i32, ptr %15, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %63, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = load i32, ptr %15, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds double, ptr %25, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !11
  %72 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %71, double %67)
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %37, i64 %74
  store double %72, ptr %75, align 8, !tbaa !11
  br label %76

76:                                               ; preds = %62
  %77 = load i32, ptr %15, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %15, align 4, !tbaa !9
  br label %58, !llvm.loop !15

79:                                               ; preds = %58
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %95, %79
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %84, label %98

84:                                               ; preds = %80
  %85 = load double, ptr %13, align 8, !tbaa !11
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load double, ptr %12, align 8, !tbaa !11
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = call double %86(ptr noundef %87, ptr noundef %37, double noundef %88, i32 noundef %89)
  %91 = fmul double %85, %90
  %92 = load i32, ptr %15, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %28, i64 %93
  store double %91, ptr %94, align 8, !tbaa !11
  br label %95

95:                                               ; preds = %84
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %15, align 4, !tbaa !9
  br label %80, !llvm.loop !16

98:                                               ; preds = %80
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %117, %98
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %103, label %120

103:                                              ; preds = %99
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = load i32, ptr %15, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds double, ptr %104, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !11
  %109 = load i32, ptr %15, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %28, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !11
  %113 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %112, double %108)
  %114 = load i32, ptr %15, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds double, ptr %37, i64 %115
  store double %113, ptr %116, align 8, !tbaa !11
  br label %117

117:                                              ; preds = %103
  %118 = load i32, ptr %15, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %15, align 4, !tbaa !9
  br label %99, !llvm.loop !17

120:                                              ; preds = %99
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %136, %120
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = load i32, ptr %11, align 4, !tbaa !9
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %125, label %139

125:                                              ; preds = %121
  %126 = load double, ptr %13, align 8, !tbaa !11
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load double, ptr %12, align 8, !tbaa !11
  %130 = load i32, ptr %15, align 4, !tbaa !9
  %131 = call double %127(ptr noundef %128, ptr noundef %37, double noundef %129, i32 noundef %130)
  %132 = fmul double %126, %131
  %133 = load i32, ptr %15, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds double, ptr %31, i64 %134
  store double %132, ptr %135, align 8, !tbaa !11
  br label %136

136:                                              ; preds = %125
  %137 = load i32, ptr %15, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %15, align 4, !tbaa !9
  br label %121, !llvm.loop !18

139:                                              ; preds = %121
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %158, %139
  %141 = load i32, ptr %15, align 4, !tbaa !9
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %144, label %161

144:                                              ; preds = %140
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load i32, ptr %15, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds double, ptr %145, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !11
  %150 = load i32, ptr %15, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %31, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !11
  %154 = fadd double %149, %153
  %155 = load i32, ptr %15, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds double, ptr %37, i64 %156
  store double %154, ptr %157, align 8, !tbaa !11
  br label %158

158:                                              ; preds = %144
  %159 = load i32, ptr %15, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %15, align 4, !tbaa !9
  br label %140, !llvm.loop !19

161:                                              ; preds = %140
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %177, %161
  %163 = load i32, ptr %15, align 4, !tbaa !9
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %166, label %180

166:                                              ; preds = %162
  %167 = load double, ptr %13, align 8, !tbaa !11
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = load double, ptr %12, align 8, !tbaa !11
  %171 = load i32, ptr %15, align 4, !tbaa !9
  %172 = call double %168(ptr noundef %169, ptr noundef %37, double noundef %170, i32 noundef %171)
  %173 = fmul double %167, %172
  %174 = load i32, ptr %15, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds double, ptr %34, i64 %175
  store double %173, ptr %176, align 8, !tbaa !11
  br label %177

177:                                              ; preds = %166
  %178 = load i32, ptr %15, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %15, align 4, !tbaa !9
  br label %162, !llvm.loop !20

180:                                              ; preds = %162
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %181

181:                                              ; preds = %215, %180
  %182 = load i32, ptr %15, align 4, !tbaa !9
  %183 = load i32, ptr %11, align 4, !tbaa !9
  %184 = icmp slt i32 %182, %183
  br i1 %184, label %185, label %218

185:                                              ; preds = %181
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = load i32, ptr %15, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds double, ptr %186, i64 %188
  %190 = load double, ptr %189, align 8, !tbaa !11
  %191 = load i32, ptr %15, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds double, ptr %25, i64 %192
  %194 = load double, ptr %193, align 8, !tbaa !11
  %195 = load i32, ptr %15, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds double, ptr %28, i64 %196
  %198 = load double, ptr %197, align 8, !tbaa !11
  %199 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %198, double %194)
  %200 = load i32, ptr %15, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds double, ptr %31, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !11
  %204 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %203, double %199)
  %205 = load i32, ptr %15, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds double, ptr %34, i64 %206
  %208 = load double, ptr %207, align 8, !tbaa !11
  %209 = fadd double %204, %208
  %210 = fdiv double %209, 6.000000e+00
  %211 = fadd double %190, %210
  %212 = load i32, ptr %15, align 4, !tbaa !9
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds double, ptr %37, i64 %213
  store double %211, ptr %214, align 8, !tbaa !11
  br label %215

215:                                              ; preds = %185
  %216 = load i32, ptr %15, align 4, !tbaa !9
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %15, align 4, !tbaa !9
  br label %181, !llvm.loop !21

218:                                              ; preds = %181
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %219

219:                                              ; preds = %232, %218
  %220 = load i32, ptr %15, align 4, !tbaa !9
  %221 = load i32, ptr %11, align 4, !tbaa !9
  %222 = icmp slt i32 %220, %221
  br i1 %222, label %223, label %235

223:                                              ; preds = %219
  %224 = load i32, ptr %15, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds double, ptr %37, i64 %225
  %227 = load double, ptr %226, align 8, !tbaa !11
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  %229 = load i32, ptr %15, align 4, !tbaa !9
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  store double %227, ptr %231, align 8, !tbaa !11
  br label %232

232:                                              ; preds = %223
  %233 = load i32, ptr %15, align 4, !tbaa !9
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %15, align 4, !tbaa !9
  br label %219, !llvm.loop !22

235:                                              ; preds = %219
  %236 = load ptr, ptr %16, align 8
  call void @llvm.stackrestore.p0(ptr %236)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { nocallback nofree nosync nounwind willreturn }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

; Function Attrs: nounwind uwtable
define dso_local void @RK4basic(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3, double noundef %4, double noundef %5, ptr nocapture noundef readonly %6) local_unnamed_addr #1 {
  %8 = zext i32 %3 to i64
  %9 = alloca double, i64 %8, align 16
  %10 = alloca double, i64 %8, align 16
  %11 = alloca double, i64 %8, align 16
  %12 = alloca double, i64 %8, align 16
  %13 = alloca double, i64 %8, align 16
  %14 = icmp sgt i32 %3, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.preheader86:                                     ; preds = %.lr.ph
  br i1 %14, label %.lr.ph89.preheader, label %._crit_edge

.lr.ph89.preheader:                               ; preds = %.preheader86
  %min.iters.check = icmp ult i32 %3, 4
  br i1 %min.iters.check, label %.lr.ph89.preheader195, label %vector.ph

.lr.ph89.preheader195:                            ; preds = %middle.block, %.lr.ph89.preheader
  %indvars.iv105.ph = phi i64 [ 0, %.lr.ph89.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph89

vector.ph:                                        ; preds = %.lr.ph89.preheader
  %n.vec = and i64 %8, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %15 = getelementptr inbounds double, ptr %1, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %wide.load = load <2 x double>, ptr %15, align 8, !tbaa !5
  %wide.load143 = load <2 x double>, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds double, ptr %9, i64 %index
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %wide.load144 = load <2 x double>, ptr %17, align 16, !tbaa !5
  %wide.load145 = load <2 x double>, ptr %18, align 16, !tbaa !5
  %19 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load144, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> %wide.load)
  %20 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load145, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> %wide.load143)
  %21 = getelementptr inbounds double, ptr %13, i64 %index
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  store <2 x double> %19, ptr %21, align 16, !tbaa !5
  store <2 x double> %20, ptr %22, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %8
  br i1 %cmp.n, label %.preheader85, label %.lr.ph89.preheader195

.lr.ph:                                           ; preds = %7, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %7 ]
  %24 = trunc nuw nsw i64 %indvars.iv to i32
  %25 = tail call double %6(ptr noundef %0, ptr noundef %1, double noundef %4, i32 noundef %24) #4
  %26 = fmul double %25, %5
  %27 = getelementptr inbounds double, ptr %9, i64 %indvars.iv
  store double %26, ptr %27, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %8
  br i1 %exitcond.not, label %.preheader86, label %.lr.ph, !llvm.loop !13

.preheader85:                                     ; preds = %.lr.ph89, %middle.block
  br i1 %14, label %.lr.ph91, label %._crit_edge

.lr.ph89:                                         ; preds = %.lr.ph89.preheader195, %.lr.ph89
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.lr.ph89 ], [ %indvars.iv105.ph, %.lr.ph89.preheader195 ]
  %28 = getelementptr inbounds double, ptr %1, i64 %indvars.iv105
  %29 = load double, ptr %28, align 8, !tbaa !5
  %30 = getelementptr inbounds double, ptr %9, i64 %indvars.iv105
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = tail call double @llvm.fmuladd.f64(double %31, double 5.000000e-01, double %29)
  %33 = getelementptr inbounds double, ptr %13, i64 %indvars.iv105
  store double %32, ptr %33, align 8, !tbaa !5
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next106, %8
  br i1 %exitcond109.not, label %.preheader85, label %.lr.ph89, !llvm.loop !14

.preheader84:                                     ; preds = %.lr.ph91
  br i1 %14, label %.lr.ph93.preheader, label %._crit_edge

.lr.ph93.preheader:                               ; preds = %.preheader84
  %min.iters.check148 = icmp ult i32 %3, 4
  br i1 %min.iters.check148, label %.lr.ph93.preheader194, label %vector.ph149

.lr.ph93.preheader194:                            ; preds = %middle.block146, %.lr.ph93.preheader
  %indvars.iv115.ph = phi i64 [ 0, %.lr.ph93.preheader ], [ %n.vec151, %middle.block146 ]
  br label %.lr.ph93

vector.ph149:                                     ; preds = %.lr.ph93.preheader
  %n.vec151 = and i64 %8, 2147483644
  br label %vector.body153

vector.body153:                                   ; preds = %vector.body153, %vector.ph149
  %index154 = phi i64 [ 0, %vector.ph149 ], [ %index.next159, %vector.body153 ]
  %34 = getelementptr inbounds double, ptr %1, i64 %index154
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %wide.load155 = load <2 x double>, ptr %34, align 8, !tbaa !5
  %wide.load156 = load <2 x double>, ptr %35, align 8, !tbaa !5
  %36 = getelementptr inbounds double, ptr %10, i64 %index154
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %wide.load157 = load <2 x double>, ptr %36, align 16, !tbaa !5
  %wide.load158 = load <2 x double>, ptr %37, align 16, !tbaa !5
  %38 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load157, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> %wide.load155)
  %39 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load158, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> %wide.load156)
  %40 = getelementptr inbounds double, ptr %13, i64 %index154
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  store <2 x double> %38, ptr %40, align 16, !tbaa !5
  store <2 x double> %39, ptr %41, align 16, !tbaa !5
  %index.next159 = add nuw i64 %index154, 4
  %42 = icmp eq i64 %index.next159, %n.vec151
  br i1 %42, label %middle.block146, label %vector.body153, !llvm.loop !15

middle.block146:                                  ; preds = %vector.body153
  %cmp.n160 = icmp eq i64 %n.vec151, %8
  br i1 %cmp.n160, label %.preheader83, label %.lr.ph93.preheader194

.lr.ph91:                                         ; preds = %.preheader85, %.lr.ph91
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.lr.ph91 ], [ 0, %.preheader85 ]
  %43 = trunc nuw nsw i64 %indvars.iv110 to i32
  %44 = call double %6(ptr noundef %0, ptr noundef nonnull %13, double noundef %4, i32 noundef %43) #4
  %45 = fmul double %44, %5
  %46 = getelementptr inbounds double, ptr %10, i64 %indvars.iv110
  store double %45, ptr %46, align 8, !tbaa !5
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond114.not = icmp eq i64 %indvars.iv.next111, %8
  br i1 %exitcond114.not, label %.preheader84, label %.lr.ph91, !llvm.loop !16

.preheader83:                                     ; preds = %.lr.ph93, %middle.block146
  br i1 %14, label %.lr.ph95, label %._crit_edge

.lr.ph93:                                         ; preds = %.lr.ph93.preheader194, %.lr.ph93
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %.lr.ph93 ], [ %indvars.iv115.ph, %.lr.ph93.preheader194 ]
  %47 = getelementptr inbounds double, ptr %1, i64 %indvars.iv115
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds double, ptr %10, i64 %indvars.iv115
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = call double @llvm.fmuladd.f64(double %50, double 5.000000e-01, double %48)
  %52 = getelementptr inbounds double, ptr %13, i64 %indvars.iv115
  store double %51, ptr %52, align 8, !tbaa !5
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next116, %8
  br i1 %exitcond119.not, label %.preheader83, label %.lr.ph93, !llvm.loop !17

.preheader82:                                     ; preds = %.lr.ph95
  br i1 %14, label %.lr.ph97.preheader, label %._crit_edge

.lr.ph97.preheader:                               ; preds = %.preheader82
  %min.iters.check163 = icmp ult i32 %3, 4
  br i1 %min.iters.check163, label %.lr.ph97.preheader193, label %vector.ph164

.lr.ph97.preheader193:                            ; preds = %middle.block161, %.lr.ph97.preheader
  %indvars.iv125.ph = phi i64 [ 0, %.lr.ph97.preheader ], [ %n.vec166, %middle.block161 ]
  br label %.lr.ph97

vector.ph164:                                     ; preds = %.lr.ph97.preheader
  %n.vec166 = and i64 %8, 2147483644
  br label %vector.body168

vector.body168:                                   ; preds = %vector.body168, %vector.ph164
  %index169 = phi i64 [ 0, %vector.ph164 ], [ %index.next174, %vector.body168 ]
  %53 = getelementptr inbounds double, ptr %1, i64 %index169
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %wide.load170 = load <2 x double>, ptr %53, align 8, !tbaa !5
  %wide.load171 = load <2 x double>, ptr %54, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %11, i64 %index169
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load172 = load <2 x double>, ptr %55, align 16, !tbaa !5
  %wide.load173 = load <2 x double>, ptr %56, align 16, !tbaa !5
  %57 = fadd <2 x double> %wide.load170, %wide.load172
  %58 = fadd <2 x double> %wide.load171, %wide.load173
  %59 = getelementptr inbounds double, ptr %13, i64 %index169
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  store <2 x double> %57, ptr %59, align 16, !tbaa !5
  store <2 x double> %58, ptr %60, align 16, !tbaa !5
  %index.next174 = add nuw i64 %index169, 4
  %61 = icmp eq i64 %index.next174, %n.vec166
  br i1 %61, label %middle.block161, label %vector.body168, !llvm.loop !18

middle.block161:                                  ; preds = %vector.body168
  %cmp.n175 = icmp eq i64 %n.vec166, %8
  br i1 %cmp.n175, label %.preheader81, label %.lr.ph97.preheader193

.lr.ph95:                                         ; preds = %.preheader83, %.lr.ph95
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %.lr.ph95 ], [ 0, %.preheader83 ]
  %62 = trunc nuw nsw i64 %indvars.iv120 to i32
  %63 = call double %6(ptr noundef %0, ptr noundef nonnull %13, double noundef %4, i32 noundef %62) #4
  %64 = fmul double %63, %5
  %65 = getelementptr inbounds double, ptr %11, i64 %indvars.iv120
  store double %64, ptr %65, align 8, !tbaa !5
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %exitcond124.not = icmp eq i64 %indvars.iv.next121, %8
  br i1 %exitcond124.not, label %.preheader82, label %.lr.ph95, !llvm.loop !19

.preheader81:                                     ; preds = %.lr.ph97, %middle.block161
  br i1 %14, label %.lr.ph99, label %._crit_edge

.lr.ph97:                                         ; preds = %.lr.ph97.preheader193, %.lr.ph97
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %.lr.ph97 ], [ %indvars.iv125.ph, %.lr.ph97.preheader193 ]
  %66 = getelementptr inbounds double, ptr %1, i64 %indvars.iv125
  %67 = load double, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %11, i64 %indvars.iv125
  %69 = load double, ptr %68, align 8, !tbaa !5
  %70 = fadd double %67, %69
  %71 = getelementptr inbounds double, ptr %13, i64 %indvars.iv125
  store double %70, ptr %71, align 8, !tbaa !5
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %exitcond129.not = icmp eq i64 %indvars.iv.next126, %8
  br i1 %exitcond129.not, label %.preheader81, label %.lr.ph97, !llvm.loop !20

.preheader80:                                     ; preds = %.lr.ph99
  br i1 %14, label %.lr.ph101.preheader, label %._crit_edge

.lr.ph101.preheader:                              ; preds = %.preheader80
  %min.iters.check178 = icmp eq i32 %3, 1
  br i1 %min.iters.check178, label %.lr.ph101.preheader192, label %vector.ph179

.lr.ph101.preheader192:                           ; preds = %middle.block176, %.lr.ph101.preheader
  %indvars.iv135.ph = phi i64 [ 0, %.lr.ph101.preheader ], [ %n.vec181, %middle.block176 ]
  br label %.lr.ph101

vector.ph179:                                     ; preds = %.lr.ph101.preheader
  %n.vec181 = and i64 %8, 2147483646
  br label %vector.body183

vector.body183:                                   ; preds = %vector.body183, %vector.ph179
  %index184 = phi i64 [ 0, %vector.ph179 ], [ %index.next190, %vector.body183 ]
  %72 = getelementptr inbounds double, ptr %1, i64 %index184
  %wide.load185 = load <2 x double>, ptr %72, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %9, i64 %index184
  %wide.load186 = load <2 x double>, ptr %73, align 16, !tbaa !5
  %74 = getelementptr inbounds double, ptr %10, i64 %index184
  %wide.load187 = load <2 x double>, ptr %74, align 16, !tbaa !5
  %75 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load187, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %wide.load186)
  %76 = getelementptr inbounds double, ptr %11, i64 %index184
  %wide.load188 = load <2 x double>, ptr %76, align 16, !tbaa !5
  %77 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load188, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %75)
  %78 = getelementptr inbounds double, ptr %12, i64 %index184
  %wide.load189 = load <2 x double>, ptr %78, align 16, !tbaa !5
  %79 = fadd <2 x double> %77, %wide.load189
  %80 = fdiv <2 x double> %79, <double 6.000000e+00, double 6.000000e+00>
  %81 = fadd <2 x double> %wide.load185, %80
  %82 = getelementptr inbounds double, ptr %13, i64 %index184
  store <2 x double> %81, ptr %82, align 16, !tbaa !5
  %index.next190 = add nuw i64 %index184, 2
  %83 = icmp eq i64 %index.next190, %n.vec181
  br i1 %83, label %middle.block176, label %vector.body183, !llvm.loop !21

middle.block176:                                  ; preds = %vector.body183
  %cmp.n191 = icmp eq i64 %n.vec181, %8
  br i1 %cmp.n191, label %.preheader, label %.lr.ph101.preheader192

.lr.ph99:                                         ; preds = %.preheader81, %.lr.ph99
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %.lr.ph99 ], [ 0, %.preheader81 ]
  %84 = trunc nuw nsw i64 %indvars.iv130 to i32
  %85 = call double %6(ptr noundef %0, ptr noundef nonnull %13, double noundef %4, i32 noundef %84) #4
  %86 = fmul double %85, %5
  %87 = getelementptr inbounds double, ptr %12, i64 %indvars.iv130
  store double %86, ptr %87, align 8, !tbaa !5
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %exitcond134.not = icmp eq i64 %indvars.iv.next131, %8
  br i1 %exitcond134.not, label %.preheader80, label %.lr.ph99, !llvm.loop !22

.preheader:                                       ; preds = %.lr.ph101, %middle.block176
  br i1 %14, label %.lr.ph103.preheader, label %._crit_edge

.lr.ph103.preheader:                              ; preds = %.preheader
  %88 = shl nuw nsw i64 %8, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr nonnull align 16 %13, i64 %88, i1 false), !tbaa !5
  br label %._crit_edge

.lr.ph101:                                        ; preds = %.lr.ph101.preheader192, %.lr.ph101
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %.lr.ph101 ], [ %indvars.iv135.ph, %.lr.ph101.preheader192 ]
  %89 = getelementptr inbounds double, ptr %1, i64 %indvars.iv135
  %90 = load double, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds double, ptr %9, i64 %indvars.iv135
  %92 = load double, ptr %91, align 8, !tbaa !5
  %93 = getelementptr inbounds double, ptr %10, i64 %indvars.iv135
  %94 = load double, ptr %93, align 8, !tbaa !5
  %95 = call double @llvm.fmuladd.f64(double %94, double 2.000000e+00, double %92)
  %96 = getelementptr inbounds double, ptr %11, i64 %indvars.iv135
  %97 = load double, ptr %96, align 8, !tbaa !5
  %98 = call double @llvm.fmuladd.f64(double %97, double 2.000000e+00, double %95)
  %99 = getelementptr inbounds double, ptr %12, i64 %indvars.iv135
  %100 = load double, ptr %99, align 8, !tbaa !5
  %101 = fadd double %98, %100
  %102 = fdiv double %101, 6.000000e+00
  %103 = fadd double %90, %102
  %104 = getelementptr inbounds double, ptr %13, i64 %indvars.iv135
  store double %103, ptr %104, align 8, !tbaa !5
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next136, %8
  br i1 %exitcond139.not, label %.preheader, label %.lr.ph101, !llvm.loop !23

._crit_edge:                                      ; preds = %7, %.preheader86, %.preheader85, %.preheader84, %.preheader83, %.preheader82, %.preheader81, %.preheader80, %.lr.ph103.preheader, %.preheader
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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, !12, !11}
!15 = distinct !{!15, !10, !11, !12}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !12, !11}
!18 = distinct !{!18, !10, !11, !12}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10, !12, !11}
!21 = distinct !{!21, !10, !11, !12}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10, !12, !11}


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