; LLVM IR from romerojosh/zefr :: src/prisms.ll (ZN6Prisms21calc_nodal_face_basisEjjPKd)

; 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.Prisms = type { %class.Elements, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i32, i32, i32, i32 }
%class.Elements = type { ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i8], %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %"class.std::vector.0", %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector.5, %class.mdvector.5, %class.mdvector.5, %class.mdvector.5, %class.mdvector.5, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.7", %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i64, i64, i64, i64, i64, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdview, %class.mdview, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i32, [4 x i8], %class.mdvector, %class.mdvector, i32, ptr, %"class.std::vector.7", %class.mdvector.5, %class.mdvector, %class.mdvector, %class.mdvector }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.mdview = type { %class.mdvector.12, %class.mdvector.5, i32, [4 x i8] }
%class.mdvector.12 = type <{ i32, [4 x i8], i64, i64, %"struct.std::array", %"struct.std::array", %"class.std::vector.13", ptr, i8, [7 x i8] }>
%"struct.std::array" = type { [6 x i32] }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.mdvector.5 = type <{ i32, [4 x i8], i64, i64, %"struct.std::array", %"struct.std::array", %"class.std::vector.0", ptr, i8, [7 x i8] }>
%class.mdvector = type <{ i32, [4 x i8], i64, i64, %"struct.std::array", %"struct.std::array", %"class.std::vector", ptr, i8, [7 x i8] }>

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105), i32 noundef, i32 noundef) #1 align 2

declare noundef double @_Z9Dubiner2Djddj(i32 noundef, double noundef, double noundef, i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Prisms21calc_nodal_face_basisEjjPKd(ptr noundef nonnull align 8 dereferenceable(14544) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) unnamed_addr #4 align 2 {
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  %14 = load ptr, ptr %6, align 8
  %15 = load i32, ptr %7, align 4, !tbaa !9
  %16 = icmp ult i32 %15, 2
  br i1 %16, label %17, label %47

17:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store double 0.000000e+00, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %42, %17
  %19 = load i32, ptr %11, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.Prisms, ptr %14, i32 0, i32 7
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = icmp ult i32 %19, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %45

24:                                               ; preds = %18
  %25 = getelementptr inbounds %class.Prisms, ptr %14, i32 0, i32 2
  %26 = load i32, ptr %11, align 4, !tbaa !9
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %25, i32 noundef %26, i32 noundef %27)
  %29 = load double, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds %class.Elements, ptr %14, i32 0, i32 5
  %31 = load i32, ptr %30, align 8, !tbaa !40
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %32, i64 0
  %34 = load double, ptr %33, align 8, !tbaa !11
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds double, ptr %35, i64 1
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = call noundef double @_Z9Dubiner2Djddj(i32 noundef %31, double noundef %34, double noundef %37, i32 noundef %38)
  %40 = load double, ptr %10, align 8, !tbaa !11
  %41 = call double @llvm.fmuladd.f64(double %29, double %39, double %40)
  store double %41, ptr %10, align 8, !tbaa !11
  br label %42

42:                                               ; preds = %24
  %43 = load i32, ptr %11, align 4, !tbaa !9
  %44 = add i32 %43, 1
  store i32 %44, ptr %11, align 4, !tbaa !9
  br label %18, !llvm.loop !41

45:                                               ; preds = %23
  %46 = load double, ptr %10, align 8, !tbaa !11
  store double %46, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %69

47:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = getelementptr inbounds %class.Prisms, ptr %14, i32 0, i32 8
  %50 = load i32, ptr %49, align 8, !tbaa !43
  %51 = urem i32 %48, %50
  store i32 %51, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = getelementptr inbounds %class.Prisms, ptr %14, i32 0, i32 8
  %54 = load i32, ptr %53, align 8, !tbaa !43
  %55 = udiv i32 %52, %54
  store i32 %55, ptr %13, align 4, !tbaa !9
  %56 = getelementptr inbounds %class.Elements, ptr %14, i32 0, i32 38
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i64 0
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %56, i32 noundef %57, double noundef %60)
  %62 = getelementptr inbounds %class.Elements, ptr %14, i32 0, i32 38
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %64, i64 1
  %66 = load double, ptr %65, align 8, !tbaa !11
  %67 = call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %62, i32 noundef %63, double noundef %66)
  %68 = fmul double %61, %67
  store double %68, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %69

69:                                               ; preds = %47, %45
  %70 = load double, ptr %5, align 8
  ret double %70
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, double noundef) #5

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 = { "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) }
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 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 14532}
!14 = !{!"_ZTS6Prisms", !15, i64 0, !17, i64 13968, !17, i64 14080, !17, i64 14192, !17, i64 14304, !17, i64 14416, !10, i64 14528, !10, i64 14532, !10, i64 14536, !10, i64 14540}
!15 = !{!"_ZTS8Elements", !6, i64 8, !6, i64 16, !16, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !17, i64 104, !17, i64 216, !17, i64 328, !17, i64 440, !25, i64 552, !17, i64 576, !17, i64 688, !17, i64 800, !17, i64 912, !17, i64 1024, !29, i64 1136, !29, i64 1248, !29, i64 1360, !29, i64 1472, !29, i64 1584, !20, i64 1696, !20, i64 1720, !20, i64 1744, !20, i64 1768, !17, i64 1792, !17, i64 1904, !17, i64 2016, !17, i64 2128, !17, i64 2240, !17, i64 2352, !17, i64 2464, !17, i64 2576, !17, i64 2688, !17, i64 2800, !17, i64 2912, !17, i64 3024, !17, i64 3136, !17, i64 3248, !17, i64 3360, !17, i64 3472, !17, i64 3584, !17, i64 3696, !17, i64 3808, !17, i64 3920, !17, i64 4032, !17, i64 4144, !17, i64 4256, !17, i64 4368, !17, i64 4480, !17, i64 4592, !17, i64 4704, !17, i64 4816, !17, i64 4928, !17, i64 5040, !17, i64 5152, !17, i64 5264, !17, i64 5376, !17, i64 5488, !17, i64 5600, !17, i64 5712, !17, i64 5824, !17, i64 5936, !10, i64 6048, !20, i64 6056, !20, i64 6080, !20, i64 6104, !20, i64 6128, !20, i64 6152, !20, i64 6176, !20, i64 6200, !30, i64 6224, !17, i64 6248, !17, i64 6360, !17, i64 6472, !17, i64 6584, !17, i64 6696, !17, i64 6808, !17, i64 6920, !17, i64 7032, !17, i64 7144, !18, i64 7256, !18, i64 7264, !18, i64 7272, !18, i64 7280, !18, i64 7288, !17, i64 7296, !17, i64 7408, !17, i64 7520, !17, i64 7632, !17, i64 7744, !17, i64 7856, !17, i64 7968, !17, i64 8080, !17, i64 8192, !17, i64 8304, !17, i64 8416, !17, i64 8528, !17, i64 8640, !17, i64 8752, !17, i64 8864, !17, i64 8976, !17, i64 9088, !17, i64 9200, !17, i64 9312, !17, i64 9424, !17, i64 9536, !17, i64 9648, !17, i64 9760, !17, i64 9872, !17, i64 9984, !17, i64 10096, !17, i64 10208, !17, i64 10320, !17, i64 10432, !17, i64 10544, !17, i64 10656, !17, i64 10768, !17, i64 10880, !17, i64 10992, !17, i64 11104, !17, i64 11216, !17, i64 11328, !17, i64 11440, !17, i64 11552, !17, i64 11664, !17, i64 11776, !17, i64 11888, !17, i64 12000, !34, i64 12112, !34, i64 12344, !17, i64 12576, !17, i64 12688, !17, i64 12800, !17, i64 12912, !17, i64 13024, !17, i64 13136, !10, i64 13248, !17, i64 13256, !17, i64 13368, !10, i64 13480, !6, i64 13488, !30, i64 13496, !29, i64 13520, !17, i64 13632, !17, i64 13744, !17, i64 13856}
!16 = !{!"_ZTS8ELE_TYPE", !7, i64 0}
!17 = !{!"_ZTS8mdvectorIdE", !10, i64 0, !18, i64 8, !18, i64 16, !19, i64 24, !19, i64 48, !20, i64 72, !6, i64 96, !24, i64 104}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt5arrayIjLm6EE", !7, i64 0}
!20 = !{!"_ZTSSt6vectorIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIjSaIjEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTS8mdvectorIjE", !10, i64 0, !18, i64 8, !18, i64 16, !19, i64 24, !19, i64 48, !25, i64 72, !6, i64 96, !24, i64 104}
!30 = !{!"_ZTSSt6vectorIiSaIiEE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTS6mdviewIdE", !35, i64 0, !29, i64 112, !10, i64 224}
!35 = !{!"_ZTS8mdvectorIPdE", !10, i64 0, !18, i64 8, !18, i64 16, !19, i64 24, !19, i64 48, !36, i64 72, !6, i64 96, !24, i64 104}
!36 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = !{!15, !10, i64 32}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!14, !10, i64 14536}


; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

declare noundef double @_Z9Dubiner2Djddj(i32 noundef, double noundef, double noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Prisms21calc_nodal_face_basisEjjPKd(ptr noundef nonnull align 8 dereferenceable(14544) %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3) unnamed_addr #3 align 2 {
  %5 = icmp ult i32 %1, 2
  br i1 %5, label %.preheader, label %22

.preheader:                                       ; preds = %4
  %6 = getelementptr inbounds i8, ptr %0, i64 14532
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %8 = getelementptr inbounds i8, ptr %0, i64 14080
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  br label %11

11:                                               ; preds = %.lr.ph, %11
  %.01720 = phi double [ 0.000000e+00, %.lr.ph ], [ %18, %11 ]
  %.01819 = phi i32 [ 0, %.lr.ph ], [ %19, %11 ]
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %8, i32 noundef %.01819, i32 noundef %2)
  %13 = load double, ptr %12, align 8, !tbaa !36
  %14 = load i32, ptr %9, align 8, !tbaa !38
  %15 = load double, ptr %3, align 8, !tbaa !36
  %16 = load double, ptr %10, align 8, !tbaa !36
  %17 = tail call noundef double @_Z9Dubiner2Djddj(i32 noundef %14, double noundef %15, double noundef %16, i32 noundef %.01819)
  %18 = tail call double @llvm.fmuladd.f64(double %13, double %17, double %.01720)
  %19 = add nuw i32 %.01819, 1
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = icmp ult i32 %19, %20
  br i1 %21, label %11, label %.loopexit, !llvm.loop !39

22:                                               ; preds = %4
  %23 = getelementptr inbounds i8, ptr %0, i64 14536
  %24 = load i32, ptr %23, align 8, !tbaa !41
  %25 = urem i32 %2, %24
  %26 = udiv i32 %2, %24
  %27 = getelementptr inbounds i8, ptr %0, i64 1696
  %28 = load double, ptr %3, align 8, !tbaa !36
  %29 = tail call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %27, i32 noundef %25, double noundef %28)
  %30 = getelementptr inbounds i8, ptr %3, i64 8
  %31 = load double, ptr %30, align 8, !tbaa !36
  %32 = tail call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %27, i32 noundef %26, double noundef %31)
  %33 = fmul double %29, %32
  br label %.loopexit

.loopexit:                                        ; preds = %11, %.preheader, %22
  %.0 = phi double [ %33, %22 ], [ 0.000000e+00, %.preheader ], [ %18, %11 ]
  ret double %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, double noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { "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 = { 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" }

!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, !12, i64 14532}
!6 = !{!"_ZTS6Prisms", !7, i64 0, !13, i64 13968, !13, i64 14080, !13, i64 14192, !13, i64 14304, !13, i64 14416, !12, i64 14528, !12, i64 14532, !12, i64 14536, !12, i64 14540}
!7 = !{!"_ZTS8Elements", !8, i64 8, !8, i64 16, !11, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !13, i64 104, !13, i64 216, !13, i64 328, !13, i64 440, !21, i64 552, !13, i64 576, !13, i64 688, !13, i64 800, !13, i64 912, !13, i64 1024, !25, i64 1136, !25, i64 1248, !25, i64 1360, !25, i64 1472, !25, i64 1584, !16, i64 1696, !16, i64 1720, !16, i64 1744, !16, i64 1768, !13, i64 1792, !13, i64 1904, !13, i64 2016, !13, i64 2128, !13, i64 2240, !13, i64 2352, !13, i64 2464, !13, i64 2576, !13, i64 2688, !13, i64 2800, !13, i64 2912, !13, i64 3024, !13, i64 3136, !13, i64 3248, !13, i64 3360, !13, i64 3472, !13, i64 3584, !13, i64 3696, !13, i64 3808, !13, i64 3920, !13, i64 4032, !13, i64 4144, !13, i64 4256, !13, i64 4368, !13, i64 4480, !13, i64 4592, !13, i64 4704, !13, i64 4816, !13, i64 4928, !13, i64 5040, !13, i64 5152, !13, i64 5264, !13, i64 5376, !13, i64 5488, !13, i64 5600, !13, i64 5712, !13, i64 5824, !13, i64 5936, !12, i64 6048, !16, i64 6056, !16, i64 6080, !16, i64 6104, !16, i64 6128, !16, i64 6152, !16, i64 6176, !16, i64 6200, !26, i64 6224, !13, i64 6248, !13, i64 6360, !13, i64 6472, !13, i64 6584, !13, i64 6696, !13, i64 6808, !13, i64 6920, !13, i64 7032, !13, i64 7144, !14, i64 7256, !14, i64 7264, !14, i64 7272, !14, i64 7280, !14, i64 7288, !13, i64 7296, !13, i64 7408, !13, i64 7520, !13, i64 7632, !13, i64 7744, !13, i64 7856, !13, i64 7968, !13, i64 8080, !13, i64 8192, !13, i64 8304, !13, i64 8416, !13, i64 8528, !13, i64 8640, !13, i64 8752, !13, i64 8864, !13, i64 8976, !13, i64 9088, !13, i64 9200, !13, i64 9312, !13, i64 9424, !13, i64 9536, !13, i64 9648, !13, i64 9760, !13, i64 9872, !13, i64 9984, !13, i64 10096, !13, i64 10208, !13, i64 10320, !13, i64 10432, !13, i64 10544, !13, i64 10656, !13, i64 10768, !13, i64 10880, !13, i64 10992, !13, i64 11104, !13, i64 11216, !13, i64 11328, !13, i64 11440, !13, i64 11552, !13, i64 11664, !13, i64 11776, !13, i64 11888, !13, i64 12000, !30, i64 12112, !30, i64 12344, !13, i64 12576, !13, i64 12688, !13, i64 12800, !13, i64 12912, !13, i64 13024, !13, i64 13136, !12, i64 13248, !13, i64 13256, !13, i64 13368, !12, i64 13480, !8, i64 13488, !26, i64 13496, !25, i64 13520, !13, i64 13632, !13, i64 13744, !13, i64 13856}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS8ELE_TYPE", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"_ZTS8mdvectorIdE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !16, i64 72, !8, i64 96, !20, i64 104}
!14 = !{!"long", !9, i64 0}
!15 = !{!"_ZTSSt5arrayIjLm6EE", !9, i64 0}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!20 = !{!"bool", !9, i64 0}
!21 = !{!"_ZTSSt6vectorIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!25 = !{!"_ZTS8mdvectorIjE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !21, i64 72, !8, i64 96, !20, i64 104}
!26 = !{!"_ZTSSt6vectorIiSaIiEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!30 = !{!"_ZTS6mdviewIdE", !31, i64 0, !25, i64 112, !12, i64 224}
!31 = !{!"_ZTS8mdvectorIPdE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !32, i64 72, !8, i64 96, !20, i64 104}
!32 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!36 = !{!37, !37, i64 0}
!37 = !{!"double", !9, i64 0}
!38 = !{!7, !12, i64 32}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!6, !12, i64 14536}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass