; LLVM IR from RichtersFinger/ChainSimulation :: Chain.ll (ZN5Chain24quickArrangementEntwinedE6Vectordid)

; 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.Vector = type { double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%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: nounwind
declare double @sqrt(double noundef) #0

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ChainElementSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Chain12refreshLinksEv(ptr noundef nonnull align 8 dereferenceable(64)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Chain24quickArrangementEntwinedE6Vectordid(ptr noundef nonnull align 8 dereferenceable(64) %0, double %1, double %2, double noundef %3, i32 noundef %4, double noundef %5) #5 align 2 {
  %7 = alloca %class.Vector, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca ptr, align 8
  %19 = alloca double, align 8
  %20 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  store double %1, ptr %20, align 8
  %21 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  store double %2, ptr %21, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store double %3, ptr %9, align 8, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !11
  store double %5, ptr %11, align 8, !tbaa !9
  %22 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %23 = getelementptr inbounds %class.Chain, ptr %22, i32 0, i32 5
  %24 = call noundef i64 @_ZNKSt6vectorIP12ChainElementSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %26 = load i32, ptr %12, align 4, !tbaa !11
  %27 = load i32, ptr %10, align 4, !tbaa !11
  %28 = sdiv i32 %26, %27
  store i32 %28, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %29 = getelementptr inbounds %class.Chain, ptr %22, i32 0, i32 5
  store ptr %29, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %30 = load ptr, ptr %15, align 8, !tbaa !5
  %31 = call ptr @_ZNSt6vectorIP12ChainElementSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %33 = load ptr, ptr %15, align 8, !tbaa !5
  %34 = call ptr @_ZNSt6vectorIP12ChainElementSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  br label %36

36:                                               ; preds = %90, %6
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ChainElementSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %37, label %39, label %38

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %92

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP12ChainElementSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  store ptr %40, ptr %18, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.Vector, ptr %7, i32 0, i32 0
  %42 = load double, ptr %41, align 8, !tbaa !13
  %43 = load double, ptr %9, align 8, !tbaa !9
  %44 = load i32, ptr %14, align 4, !tbaa !11
  %45 = sitofp i32 %44 to float
  %46 = fpext float %45 to double
  %47 = fmul double 0x401921FB4D12D84A, %46
  %48 = load i32, ptr %13, align 4, !tbaa !11
  %49 = sitofp i32 %48 to float
  %50 = fpext float %49 to double
  %51 = fdiv double %47, %50
  %52 = call double @cos(double noundef %51) #6
  %53 = call double @llvm.fmuladd.f64(double %43, double %52, double %42)
  %54 = load ptr, ptr %18, align 8, !tbaa !5
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds %class.ChainElement, ptr %55, i32 0, i32 0
  store double %53, ptr %56, align 8, !tbaa !15
  %57 = getelementptr inbounds %class.Vector, ptr %7, i32 0, i32 1
  %58 = load double, ptr %57, align 8, !tbaa !18
  %59 = load double, ptr %9, align 8, !tbaa !9
  %60 = load i32, ptr %14, align 4, !tbaa !11
  %61 = sitofp i32 %60 to float
  %62 = fpext float %61 to double
  %63 = fmul double 0x401921FB4D12D84A, %62
  %64 = load i32, ptr %13, align 4, !tbaa !11
  %65 = sitofp i32 %64 to float
  %66 = fpext float %65 to double
  %67 = fdiv double %63, %66
  %68 = call double @sin(double noundef %67) #6
  %69 = call double @llvm.fmuladd.f64(double %59, double %68, double %58)
  %70 = load double, ptr %11, align 8, !tbaa !9
  %71 = load i32, ptr %14, align 4, !tbaa !11
  %72 = sitofp i32 %71 to float
  %73 = fpext float %72 to double
  %74 = fmul double %70, %73
  %75 = load i32, ptr %12, align 4, !tbaa !11
  %76 = sitofp i32 %75 to float
  %77 = fpext float %76 to double
  %78 = fdiv double %74, %77
  %79 = load i32, ptr %10, align 4, !tbaa !11
  %80 = sitofp i32 %79 to float
  %81 = fpext float %80 to double
  %82 = fmul double %78, %81
  %83 = load double, ptr %9, align 8, !tbaa !9
  %84 = call double @llvm.fmuladd.f64(double %82, double %83, double %69)
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.ChainElement, ptr %86, i32 0, i32 1
  store double %84, ptr %87, align 8, !tbaa !19
  %88 = load i32, ptr %14, align 4, !tbaa !11
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %90

90:                                               ; preds = %39
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP12ChainElementSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br label %36

92:                                               ; preds = %38
  call void @_ZN5Chain12refreshLinksEv(ptr noundef nonnull align 8 dereferenceable(64) %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %93 = load i32, ptr %10, align 4, !tbaa !11
  %94 = sitofp i32 %93 to double
  %95 = fmul double %94, 2.000000e+00
  %96 = fmul double %95, 0x400921FB53C8D4F1
  %97 = load double, ptr %9, align 8, !tbaa !9
  %98 = fmul double %96, %97
  store double %98, ptr %19, align 8, !tbaa !9
  %99 = load i32, ptr %12, align 4, !tbaa !11
  %100 = sitofp i32 %99 to double
  %101 = fdiv double %100, 3.000000e+03
  %102 = fmul double %101, 5.000000e-04
  %103 = getelementptr inbounds %class.Chain, ptr %22, i32 0, i32 0
  %104 = load double, ptr %103, align 8, !tbaa !20
  %105 = call double @sqrt(double noundef %104) #6
  %106 = fmul double %102, %105
  %107 = fmul double %106, 1.800000e+02
  %108 = load double, ptr %19, align 8, !tbaa !9
  %109 = fdiv double %107, %108
  %110 = getelementptr inbounds %class.Chain, ptr %22, i32 0, i32 1
  store double %109, ptr %110, align 8, !tbaa !26
  %111 = load i32, ptr %12, align 4, !tbaa !11
  %112 = sitofp i32 %111 to double
  %113 = fdiv double %112, 3.000000e+03
  %114 = fmul double %113, 5.000000e-03
  %115 = getelementptr inbounds %class.Chain, ptr %22, i32 0, i32 3
  %116 = load double, ptr %115, align 8, !tbaa !27
  %117 = call double @sqrt(double noundef %116) #6
  %118 = fmul double %114, %117
  %119 = fmul double %118, 1.800000e+02
  %120 = load double, ptr %19, align 8, !tbaa !9
  %121 = fdiv double %119, %120
  %122 = getelementptr inbounds %class.Chain, ptr %22, i32 0, i32 4
  store double %121, ptr %122, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  ret void
}

; Function Attrs: nounwind
declare double @cos(double noundef) #0

; Function Attrs: nounwind
declare double @sin(double noundef) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 0}
!14 = !{!"_ZTS6Vector", !10, i64 0, !10, i64 8}
!15 = !{!16, !10, i64 0}
!16 = !{!"_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, !17, i64 64, !6, i64 72, !6, i64 80}
!17 = !{!"bool", !7, i64 0}
!18 = !{!14, !10, i64 8}
!19 = !{!16, !10, i64 8}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTS5Chain", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !22, i64 40}
!22 = !{!"_ZTSSt6vectorIP12ChainElementSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP12ChainElementSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP12ChainElementSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP12ChainElementSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!21, !10, i64 8}
!27 = !{!21, !10, i64 24}
!28 = !{!21, !10, i64 32}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ChainElementSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Chain12refreshLinksEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Chain24quickArrangementEntwinedE6Vectordid(ptr noundef nonnull align 8 dereferenceable(64) %0, double %1, double %2, double noundef %3, i32 noundef %4, double noundef %5) local_unnamed_addr #5 align 2 {
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = tail call noundef i64 @_ZNKSt6vectorIP12ChainElementSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %11 = trunc i64 %10 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %12 = tail call ptr @_ZNSt6vectorIP12ChainElementSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  store ptr %12, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %13 = tail call ptr @_ZNSt6vectorIP12ChainElementSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  store ptr %13, ptr %8, align 8
  %14 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ChainElementSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %15 = sdiv i32 %11, %4
  %16 = sitofp i32 %15 to float
  %17 = fpext float %16 to double
  %18 = sitofp i32 %11 to float
  %19 = fpext float %18 to double
  %20 = sitofp i32 %4 to float
  %21 = fpext float %20 to double
  br label %43

._crit_edge:                                      ; preds = %43, %6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN5Chain12refreshLinksEv(ptr noundef nonnull align 8 dereferenceable(64) %0)
  %22 = sitofp i32 %4 to double
  %23 = fmul double %22, 2.000000e+00
  %24 = fmul double %23, 0x400921FB53C8D4F1
  %25 = fmul double %24, %3
  %26 = sitofp i32 %11 to double
  %27 = fdiv double %26, 3.000000e+03
  %28 = fmul double %27, 5.000000e-04
  %29 = load double, ptr %0, align 8, !tbaa !5
  %30 = call double @sqrt(double noundef %29) #6
  %31 = fmul double %28, %30
  %32 = fmul double %31, 1.800000e+02
  %33 = fdiv double %32, %25
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  store double %33, ptr %34, align 8, !tbaa !15
  %35 = fmul double %27, 5.000000e-03
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  %37 = load double, ptr %36, align 8, !tbaa !16
  %38 = call double @sqrt(double noundef %37) #6
  %39 = fmul double %35, %38
  %40 = fmul double %39, 1.800000e+02
  %41 = fdiv double %40, %25
  %42 = getelementptr inbounds i8, ptr %0, i64 32
  store double %41, ptr %42, align 8, !tbaa !17
  ret void

43:                                               ; preds = %.lr.ph, %43
  %.024 = phi i32 [ 0, %.lr.ph ], [ %60, %43 ]
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP12ChainElementSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %45 = uitofp nneg i32 %.024 to float
  %46 = fpext float %45 to double
  %47 = fmul double %46, 0x401921FB4D12D84A
  %48 = fdiv double %47, %17
  %49 = call double @cos(double noundef %48) #6
  %50 = call double @llvm.fmuladd.f64(double %3, double %49, double %1)
  %51 = load ptr, ptr %44, align 8, !tbaa !18
  store double %50, ptr %51, align 8, !tbaa !19
  %52 = call double @sin(double noundef %48) #6
  %53 = call double @llvm.fmuladd.f64(double %3, double %52, double %2)
  %54 = fmul double %46, %5
  %55 = fdiv double %54, %19
  %56 = fmul double %55, %21
  %57 = call double @llvm.fmuladd.f64(double %56, double %3, double %53)
  %58 = load ptr, ptr %44, align 8, !tbaa !18
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  store double %57, ptr %59, align 8, !tbaa !22
  %60 = add nuw nsw i32 %.024, 1
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP12ChainElementSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %62 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ChainElementSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %62, label %43, label %._crit_edge
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #0

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "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 willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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, !7, i64 0}
!6 = !{!"_ZTS5Chain", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIP12ChainElementSaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIP12ChainElementSaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIP12ChainElementSaIS1_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIP12ChainElementSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!6, !7, i64 8}
!16 = !{!6, !7, i64 24}
!17 = !{!6, !7, i64 32}
!18 = !{!14, !14, i64 0}
!19 = !{!20, !7, i64 0}
!20 = !{!"_ZTS12ChainElement", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !21, i64 64, !14, i64 72, !14, i64 80}
!21 = !{!"bool", !8, i64 0}
!22 = !{!20, !7, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass