; LLVM IR from RichtersFinger/ChainSimulation :: Simulation.ll (ZN10Simulation17getExternalForcesE5Chaind)

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

%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl" }
%"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Vector = type { double, double }
%class.Chain = type { double, double, double, double, double, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ChainElement *, std::allocator<ChainElement *>>::_Vector_impl" }
%"struct.std::_Vector_base<ChainElement *, std::allocator<ChainElement *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ChainElement *, std::allocator<ChainElement *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ChainElement *, std::allocator<ChainElement *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.ChainElement = type { double, double, double, double, double, double, double, double, i8, ptr, ptr }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP12ChainElementSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI6VectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6VectorC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10Simulation14lengthOfVectorE6Vector(ptr noundef nonnull align 8 dereferenceable(104), double, double) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI6VectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10Simulation17getExternalForcesE5Chaind(ptr dead_on_unwind noalias writable sret(%"class.std::vector.5") align 8 %0, ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef %2, double noundef %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca i1, align 1
  %10 = alloca i32, align 4
  %11 = alloca %class.Vector, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca %class.Vector, align 8
  %16 = alloca double, align 8
  %17 = alloca %class.Vector, align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !9
  %18 = load ptr, ptr %6, align 8
  store i1 false, ptr %9, align 1
  call void @_ZNSt6vectorI6VectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %19

19:                                               ; preds = %104, %4
  %20 = load i32, ptr %10, align 4, !tbaa !11
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds %class.Chain, ptr %2, i32 0, i32 5
  %23 = call noundef i64 @_ZNKSt6vectorIP12ChainElementSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  %24 = icmp ult i64 %21, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %113

26:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %27 = getelementptr inbounds %class.Chain, ptr %2, i32 0, i32 5
  %28 = load i32, ptr %10, align 4, !tbaa !11
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29) #5
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = getelementptr inbounds %class.ChainElement, ptr %31, i32 0, i32 2
  %33 = load double, ptr %32, align 8, !tbaa !13
  %34 = getelementptr inbounds %class.Chain, ptr %2, i32 0, i32 5
  %35 = load i32, ptr %10, align 4, !tbaa !11
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %36) #5
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.ChainElement, ptr %38, i32 0, i32 3
  %40 = load double, ptr %39, align 8, !tbaa !16
  invoke void @_ZN6VectorC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %33, double noundef %40)
          to label %41 unwind label %59

41:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !17
  %42 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %43 = load double, ptr %42, align 8
  %44 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %45 = load double, ptr %44, align 8
  %46 = invoke noundef double @_ZN10Simulation14lengthOfVectorE6Vector(ptr noundef nonnull align 8 dereferenceable(104) %18, double %43, double %45)
          to label %47 unwind label %63

47:                                               ; preds = %41
  store double %46, ptr %14, align 8, !tbaa !9
  %48 = load double, ptr %14, align 8, !tbaa !9
  %49 = fcmp ogt double %48, 0.000000e+00
  br i1 %49, label %50, label %67

50:                                               ; preds = %47
  %51 = load double, ptr %14, align 8, !tbaa !9
  %52 = getelementptr inbounds %class.Vector, ptr %11, i32 0, i32 0
  %53 = load double, ptr %52, align 8, !tbaa !18
  %54 = fdiv double %53, %51
  store double %54, ptr %52, align 8, !tbaa !18
  %55 = load double, ptr %14, align 8, !tbaa !9
  %56 = getelementptr inbounds %class.Vector, ptr %11, i32 0, i32 1
  %57 = load double, ptr %56, align 8, !tbaa !20
  %58 = fdiv double %57, %55
  store double %58, ptr %56, align 8, !tbaa !20
  br label %67

59:                                               ; preds = %26
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %12, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %13, align 4
  br label %112

63:                                               ; preds = %41
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %12, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %13, align 4
  br label %111

67:                                               ; preds = %50, %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store double 0.000000e+00, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %68 = getelementptr inbounds %class.Chain, ptr %2, i32 0, i32 5
  %69 = load i32, ptr %10, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %70) #5
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.ChainElement, ptr %72, i32 0, i32 4
  %74 = load double, ptr %73, align 8, !tbaa !21
  %75 = fadd double 0.000000e+00, %74
  %76 = load double, ptr %16, align 8, !tbaa !9
  %77 = load double, ptr %14, align 8, !tbaa !9
  %78 = fmul double %76, %77
  %79 = load double, ptr %14, align 8, !tbaa !9
  %80 = fmul double %78, %79
  %81 = getelementptr inbounds %class.Vector, ptr %11, i32 0, i32 0
  %82 = load double, ptr %81, align 8, !tbaa !18
  %83 = fneg double %80
  %84 = call double @llvm.fmuladd.f64(double %83, double %82, double %75)
  %85 = getelementptr inbounds %class.Chain, ptr %2, i32 0, i32 5
  %86 = load i32, ptr %10, align 4, !tbaa !11
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #5
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds %class.ChainElement, ptr %89, i32 0, i32 5
  %91 = load double, ptr %90, align 8, !tbaa !22
  %92 = fadd double -9.810000e+00, %91
  %93 = load double, ptr %16, align 8, !tbaa !9
  %94 = load double, ptr %14, align 8, !tbaa !9
  %95 = fmul double %93, %94
  %96 = load double, ptr %14, align 8, !tbaa !9
  %97 = fmul double %95, %96
  %98 = getelementptr inbounds %class.Vector, ptr %11, i32 0, i32 1
  %99 = load double, ptr %98, align 8, !tbaa !20
  %100 = fneg double %97
  %101 = call double @llvm.fmuladd.f64(double %100, double %99, double %92)
  invoke void @_ZN6VectorC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef %84, double noundef %101)
          to label %102 unwind label %107

102:                                              ; preds = %67
  invoke void @_ZNSt6vectorI6VectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %103 unwind label %107

103:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %10, align 4, !tbaa !11
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %10, align 4, !tbaa !11
  br label %19, !llvm.loop !23

107:                                              ; preds = %102, %67
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %12, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %111

111:                                              ; preds = %107, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %112

112:                                              ; preds = %111, %59
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt6vectorI6VectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %117

113:                                              ; preds = %25
  store i1 true, ptr %9, align 1
  %114 = load i1, ptr %9, align 1
  br i1 %114, label %116, label %115

115:                                              ; preds = %113
  call void @_ZNSt6vectorI6VectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %116

116:                                              ; preds = %115, %113
  ret void

117:                                              ; preds = %112
  %118 = load ptr, ptr %12, align 8
  %119 = load i32, ptr %13, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6VectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 16}
!14 = !{!"_ZTS12ChainElement", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !15, i64 64, !6, i64 72, !6, i64 80}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !10, i64 24}
!17 = !{i64 0, i64 8, !9, i64 8, i64 8, !9}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTS6Vector", !10, i64 0, !10, i64 8}
!20 = !{!19, !10, i64 8}
!21 = !{!14, !10, i64 32}
!22 = !{!14, !10, i64 40}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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

%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl" }
%"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vector, std::allocator<Vector>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Vector = type { double, double }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP12ChainElementSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI6VectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6VectorC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10Simulation14lengthOfVectorE6Vector(ptr noundef nonnull align 8 dereferenceable(104), double, double) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI6VectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10Simulation17getExternalForcesE5Chaind(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector.5") align 8 %0, ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef %2, double noundef %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.Vector, align 16
  %6 = alloca %class.Vector, align 8
  tail call void @_ZNSt6vectorI6VectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %7 = getelementptr inbounds i8, ptr %2, i64 40
  %8 = tail call noundef i64 @_ZNKSt6vectorIP12ChainElementSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  br label %9

9:                                                ; preds = %.lr.ph, %42
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %42 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  %10 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #4
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load double, ptr %12, align 8, !tbaa !9
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #4
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  %17 = load double, ptr %16, align 8, !tbaa !13
  call void @_ZN6VectorC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %13, double noundef %17)
  %.sroa.0.0.copyload = load double, ptr %5, align 16, !tbaa !14
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !14
  %18 = call noundef double @_ZN10Simulation14lengthOfVectorE6Vector(ptr noundef nonnull align 8 dereferenceable(104) %1, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %19 = fcmp ogt double %18, 0.000000e+00
  br i1 %19, label %20, label %25

20:                                               ; preds = %9
  %21 = load <2 x double>, ptr %5, align 16, !tbaa !14
  %22 = insertelement <2 x double> poison, double %18, i64 0
  %23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
  %24 = fdiv <2 x double> %21, %23
  store <2 x double> %24, ptr %5, align 16, !tbaa !14
  br label %25

25:                                               ; preds = %20, %9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #4
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 32
  %29 = load double, ptr %28, align 8, !tbaa !15
  %30 = fadd double %29, 0.000000e+00
  %31 = load double, ptr %5, align 16, !tbaa !16
  %32 = fmul double %18, -0.000000e+00
  %33 = fmul double %18, %32
  %34 = call double @llvm.fmuladd.f64(double %33, double %31, double %30)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ChainElementSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #4
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 40
  %38 = load double, ptr %37, align 8, !tbaa !18
  %39 = fadd double %38, -9.810000e+00
  %40 = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !19
  %41 = call double @llvm.fmuladd.f64(double %33, double %40, double %39)
  call void @_ZN6VectorC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef %34, double noundef %41)
  invoke void @_ZNSt6vectorI6VectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %42 unwind label %45

42:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = call noundef i64 @_ZNKSt6vectorIP12ChainElementSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %44 = icmp ugt i64 %43, %indvars.iv.next
  br i1 %44, label %9, label %._crit_edge, !llvm.loop !20

45:                                               ; preds = %25
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNSt6vectorI6VectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %46

._crit_edge:                                      ; preds = %42, %4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6VectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress 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 #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++ TBAA"}
!9 = !{!10, !11, i64 16}
!10 = !{!"_ZTS12ChainElement", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !12, i64 64, !6, i64 72, !6, i64 80}
!11 = !{!"double", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!10, !11, i64 24}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !11, i64 32}
!16 = !{!17, !11, i64 0}
!17 = !{!"_ZTS6Vector", !11, i64 0, !11, i64 8}
!18 = !{!10, !11, i64 40}
!19 = !{!17, !11, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass