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

; 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.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] }>
%class.Prisms = type { %class.Elements, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i32, i32, i32, i32 }

; 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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

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

declare noundef double @_Z8Legendrejd(i32 noundef, double noundef) #3

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

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

declare noundef double @_Z10dDubiner2Djdddj(i32 noundef, double noundef, double noundef, double noundef, i32 noundef) #3

declare noundef double @_Z11Legendre_d1jd(i32 noundef, double noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Prisms21calc_d_nodal_basis_frEjRKSt6vectorIdSaIdEEj(ptr noundef nonnull align 8 dereferenceable(14544) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3) unnamed_addr #5 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %13 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store double 0.000000e+00, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %92, %4
  %15 = load i32, ptr %10, align 4, !tbaa !9
  %16 = getelementptr inbounds %class.Elements, ptr %13, i32 0, i32 12
  %17 = load i32, ptr %16, align 4, !tbaa !13
  %18 = icmp ult i32 %15, %17
  br i1 %18, label %20, label %19

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

20:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = getelementptr inbounds %class.Prisms, ptr %13, i32 0, i32 9
  %23 = load i32, ptr %22, align 4, !tbaa !39
  %24 = udiv i32 %21, %23
  store i32 %24, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %25 = load i32, ptr %10, align 4, !tbaa !9
  %26 = getelementptr inbounds %class.Prisms, ptr %13, i32 0, i32 9
  %27 = load i32, ptr %26, align 4, !tbaa !39
  %28 = urem i32 %25, %27
  store i32 %28, ptr %12, align 4, !tbaa !9
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = icmp ult i32 %29, 2
  br i1 %30, label %31, label %62

31:                                               ; preds = %20
  %32 = getelementptr inbounds %class.Elements, ptr %13, i32 0, i32 68
  %33 = load i32, ptr %10, align 4, !tbaa !9
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %32, i32 noundef %33, i32 noundef %34)
  %36 = load double, ptr %35, align 8, !tbaa !11
  %37 = getelementptr inbounds %class.Elements, ptr %13, i32 0, i32 5
  %38 = load i32, ptr %37, align 8, !tbaa !41
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef 0) #6
  %41 = load double, ptr %40, align 8, !tbaa !11
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef 1) #6
  %44 = load double, ptr %43, align 8, !tbaa !11
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = uitofp i32 %45 to double
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = call noundef double @_Z10dDubiner2Djdddj(i32 noundef %38, double noundef %41, double noundef %44, double noundef %46, i32 noundef %47)
  %49 = fmul double %36, %48
  %50 = load i32, ptr %11, align 4, !tbaa !9
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 2) #6
  %53 = load double, ptr %52, align 8, !tbaa !11
  %54 = call noundef double @_Z8Legendrejd(i32 noundef %50, double noundef %53)
  %55 = fmul double %49, %54
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = uitofp i32 %56 to double
  %58 = fadd double %57, 5.000000e-01
  %59 = call double @sqrt(double noundef %58) #6
  %60 = load double, ptr %9, align 8, !tbaa !11
  %61 = call double @llvm.fmuladd.f64(double %55, double %59, double %60)
  store double %61, ptr %9, align 8, !tbaa !11
  br label %91

62:                                               ; preds = %20
  %63 = getelementptr inbounds %class.Elements, ptr %13, i32 0, i32 68
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %63, i32 noundef %64, i32 noundef %65)
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds %class.Elements, ptr %13, i32 0, i32 5
  %69 = load i32, ptr %68, align 8, !tbaa !41
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef 0) #6
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef 1) #6
  %75 = load double, ptr %74, align 8, !tbaa !11
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = call noundef double @_Z9Dubiner2Djddj(i32 noundef %69, double noundef %72, double noundef %75, i32 noundef %76)
  %78 = fmul double %67, %77
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef 2) #6
  %82 = load double, ptr %81, align 8, !tbaa !11
  %83 = call noundef double @_Z11Legendre_d1jd(i32 noundef %79, double noundef %82)
  %84 = fmul double %78, %83
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = uitofp i32 %85 to double
  %87 = fadd double %86, 5.000000e-01
  %88 = call double @sqrt(double noundef %87) #6
  %89 = load double, ptr %9, align 8, !tbaa !11
  %90 = call double @llvm.fmuladd.f64(double %84, double %88, double %89)
  store double %90, ptr %9, align 8, !tbaa !11
  br label %91

91:                                               ; preds = %62, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %10, align 4, !tbaa !9
  %94 = add i32 %93, 1
  store i32 %94, ptr %10, align 4, !tbaa !9
  br label %14, !llvm.loop !42

95:                                               ; preds = %19
  %96 = load double, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  ret double %96
}

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

; 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

declare noundef double @_Z8Legendrejd(i32 noundef, double 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Prisms21calc_d_nodal_basis_frEjRKSt6vectorIdSaIdEEj(ptr noundef nonnull align 8 dereferenceable(14544) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3) unnamed_addr #3 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 60
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 14540
  %8 = icmp ult i32 %3, 2
  %9 = getelementptr inbounds i8, ptr %0, i64 4704
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = uitofp nneg i32 %3 to double
  br i1 %8, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %.029.us = phi double [ %30, %.lr.ph.split.us ], [ 0.000000e+00, %.lr.ph ]
  %.02528.us = phi i32 [ %31, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %12 = load i32, ptr %7, align 4, !tbaa !35
  %13 = udiv i32 %.02528.us, %12
  %14 = urem i32 %.02528.us, %12
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %9, i32 noundef %.02528.us, i32 noundef %1)
  %16 = load double, ptr %15, align 8, !tbaa !37
  %17 = load i32, ptr %10, align 8, !tbaa !39
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #5
  %19 = load double, ptr %18, align 8, !tbaa !37
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1) #5
  %21 = load double, ptr %20, align 8, !tbaa !37
  %22 = tail call noundef double @_Z10dDubiner2Djdddj(i32 noundef %17, double noundef %19, double noundef %21, double noundef %11, i32 noundef %14)
  %23 = fmul double %16, %22
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 2) #5
  %25 = load double, ptr %24, align 8, !tbaa !37
  %26 = tail call noundef double @_Z8Legendrejd(i32 noundef %13, double noundef %25)
  %27 = fmul double %23, %26
  %28 = uitofp i32 %13 to double
  %29 = fadd double %28, 5.000000e-01
  %sqrt.us = tail call double @llvm.sqrt.f64(double %29)
  %30 = tail call double @llvm.fmuladd.f64(double %27, double %sqrt.us, double %.029.us)
  %31 = add nuw i32 %.02528.us, 1
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = icmp ult i32 %31, %32
  br i1 %33, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !40

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us, %4
  %.0.lcssa = phi double [ 0.000000e+00, %4 ], [ %30, %.lr.ph.split.us ], [ %52, %.lr.ph.split ]
  ret double %.0.lcssa

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.029 = phi double [ %52, %.lr.ph.split ], [ 0.000000e+00, %.lr.ph ]
  %.02528 = phi i32 [ %53, %.lr.ph.split ], [ 0, %.lr.ph ]
  %34 = load i32, ptr %7, align 4, !tbaa !35
  %35 = udiv i32 %.02528, %34
  %36 = urem i32 %.02528, %34
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %9, i32 noundef %.02528, i32 noundef %1)
  %38 = load double, ptr %37, align 8, !tbaa !37
  %39 = load i32, ptr %10, align 8, !tbaa !39
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #5
  %41 = load double, ptr %40, align 8, !tbaa !37
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1) #5
  %43 = load double, ptr %42, align 8, !tbaa !37
  %44 = tail call noundef double @_Z9Dubiner2Djddj(i32 noundef %39, double noundef %41, double noundef %43, i32 noundef %36)
  %45 = fmul double %38, %44
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 2) #5
  %47 = load double, ptr %46, align 8, !tbaa !37
  %48 = tail call noundef double @_Z11Legendre_d1jd(i32 noundef %35, double noundef %47)
  %49 = fmul double %45, %48
  %50 = uitofp i32 %35 to double
  %51 = fadd double %50, 5.000000e-01
  %sqrt27 = tail call double @llvm.sqrt.f64(double %51)
  %52 = tail call double @llvm.fmuladd.f64(double %49, double %sqrt27, double %.029)
  %53 = add nuw i32 %.02528, 1
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = icmp ult i32 %53, %54
  br i1 %55, label %.lr.ph.split, label %._crit_edge, !llvm.loop !40
}

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


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