; LLVM IR from romerojosh/zefr :: src/quads.ll (ZN5Quads16calc_nodal_basisEPdS0_)

; 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] }>

; 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 @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Quads16calc_nodal_basisEPdS0_(ptr noundef nonnull align 8 dereferenceable(13968) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  %12 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 82
  %13 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  %14 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = zext i32 %15 to i64
  %17 = icmp ult i64 %13, %16
  br i1 %17, label %25, label %18

18:                                               ; preds = %3
  %19 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 83
  %20 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  %21 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = icmp ult i64 %20, %23
  br i1 %24, label %25, label %34

25:                                               ; preds = %18, %3
  %26 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 82
  %27 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %29)
  %30 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 83
  %31 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %33)
  br label %34

34:                                               ; preds = %25, %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !36
  br label %35

35:                                               ; preds = %62, %34
  %36 = load i32, ptr %7, align 4, !tbaa !36
  %37 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = icmp ult i32 %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %65

41:                                               ; preds = %35
  %42 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 38
  %43 = load i32, ptr %7, align 4, !tbaa !36
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds double, ptr %44, i64 0
  %46 = load double, ptr %45, align 8, !tbaa !37
  %47 = call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %42, i32 noundef %43, double noundef %46)
  %48 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 82
  %49 = load i32, ptr %7, align 4, !tbaa !36
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #4
  store double %47, ptr %51, align 8, !tbaa !37
  %52 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 38
  %53 = load i32, ptr %7, align 4, !tbaa !36
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %54, i64 1
  %56 = load double, ptr %55, align 8, !tbaa !37
  %57 = call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %52, i32 noundef %53, double noundef %56)
  %58 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 83
  %59 = load i32, ptr %7, align 4, !tbaa !36
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #4
  store double %57, ptr %61, align 8, !tbaa !37
  br label %62

62:                                               ; preds = %41
  %63 = load i32, ptr %7, align 4, !tbaa !36
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %7, align 4, !tbaa !36
  br label %35, !llvm.loop !39

65:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !36
  br label %66

66:                                               ; preds = %104, %65
  %67 = load i32, ptr %8, align 4, !tbaa !36
  %68 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = icmp ult i32 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %107

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !36
  br label %73

73:                                               ; preds = %100, %72
  %74 = load i32, ptr %10, align 4, !tbaa !36
  %75 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = icmp ult i32 %74, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %73
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %103

79:                                               ; preds = %73
  %80 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 82
  %81 = load i32, ptr %10, align 4, !tbaa !36
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82) #4
  %84 = load double, ptr %83, align 8, !tbaa !37
  %85 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 83
  %86 = load i32, ptr %8, align 4, !tbaa !36
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #4
  %89 = load double, ptr %88, align 8, !tbaa !37
  %90 = fmul double %84, %89
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = load i32, ptr %10, align 4, !tbaa !36
  %93 = getelementptr inbounds %class.Elements, ptr %11, i32 0, i32 14
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = load i32, ptr %8, align 4, !tbaa !36
  %96 = mul i32 %94, %95
  %97 = add i32 %92, %96
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %91, i64 %98
  store double %90, ptr %99, align 8, !tbaa !37
  br label %100

100:                                              ; preds = %79
  %101 = load i32, ptr %10, align 4, !tbaa !36
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %10, align 4, !tbaa !36
  br label %73, !llvm.loop !41

103:                                              ; preds = %78
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %8, align 4, !tbaa !36
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %8, align 4, !tbaa !36
  br label %66, !llvm.loop !42

107:                                              ; preds = %71
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 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 = { 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 #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, !12, i64 68}
!10 = !{!"_ZTS8Elements", !6, i64 8, !6, 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, !6, i64 13488, !26, i64 13496, !25, i64 13520, !13, i64 13632, !13, i64 13744, !13, i64 13856}
!11 = !{!"_ZTS8ELE_TYPE", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS8mdvectorIdE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !16, i64 72, !6, i64 96, !20, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSSt5arrayIjLm6EE", !7, 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", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"bool", !7, 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", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTS8mdvectorIjE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !21, i64 72, !6, 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", !6, i64 0, !6, i64 8, !6, 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, !6, 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", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!12, !12, i64 0}
!37 = !{!38, !38, i64 0}
!38 = !{!"double", !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}
!42 = distinct !{!42, !40}


; 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 @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; 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 #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Quads16calc_nodal_basisEPdS0_(ptr noundef nonnull align 8 dereferenceable(13968) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2) unnamed_addr #2 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 6080
  %5 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 68
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = zext i32 %7 to i64
  %9 = icmp ult i64 %5, %8
  br i1 %9, label %16, label %10

10:                                               ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 6104
  %12 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  %13 = load i32, ptr %6, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = icmp ult i64 %12, %14
  br i1 %15, label %16, label %20

16:                                               ; preds = %10, %3
  %.pre-phi = phi i64 [ %14, %10 ], [ %8, %3 ]
  tail call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.pre-phi)
  %17 = getelementptr inbounds i8, ptr %0, i64 6104
  %18 = load i32, ptr %6, align 4, !tbaa !5
  %19 = zext i32 %18 to i64
  tail call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %19)
  %.pre = load i32, ptr %6, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %16, %10
  %21 = phi i32 [ %.pre, %16 ], [ %13, %10 ]
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %._crit_edge24, label %.lr.ph

.lr.ph:                                           ; preds = %20
  %22 = getelementptr inbounds i8, ptr %0, i64 1696
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  %24 = getelementptr inbounds i8, ptr %0, i64 6104
  br label %27

.preheader19:                                     ; preds = %27
  %25 = icmp eq i32 %35, 0
  br i1 %25, label %._crit_edge24, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader19
  %26 = getelementptr inbounds i8, ptr %0, i64 6104
  br label %.preheader

27:                                               ; preds = %.lr.ph, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %27 ]
  %28 = load double, ptr %1, align 8, !tbaa !35
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  %30 = tail call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef %29, double noundef %28)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #3
  store double %30, ptr %31, align 8, !tbaa !35
  %32 = load double, ptr %23, align 8, !tbaa !35
  %33 = tail call noundef double @_ZL8LagrangeRKSt6vectorIdSaIdEEjd(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef %29, double noundef %32)
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv) #3
  store double %33, ptr %34, align 8, !tbaa !35
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = zext i32 %35 to i64
  %37 = icmp ult i64 %indvars.iv.next, %36
  br i1 %37, label %27, label %.preheader19, !llvm.loop !37

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %38 = phi i32 [ 1, %.preheader.preheader ], [ %40, %._crit_edge ]
  %indvars.iv33 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next34, %._crit_edge ]
  %.not27 = icmp eq i32 %38, 0
  br i1 %.not27, label %._crit_edge, label %.lr.ph22

.lr.ph22:                                         ; preds = %.preheader
  %39 = trunc nuw nsw i64 %indvars.iv33 to i32
  br label %43

._crit_edge24:                                    ; preds = %._crit_edge, %20, %.preheader19
  ret void

._crit_edge:                                      ; preds = %43, %.preheader
  %40 = phi i32 [ 0, %.preheader ], [ %49, %43 ]
  %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1
  %41 = zext i32 %40 to i64
  %42 = icmp ult i64 %indvars.iv.next34, %41
  br i1 %42, label %.preheader, label %._crit_edge24, !llvm.loop !39

43:                                               ; preds = %.lr.ph22, %43
  %indvars.iv30 = phi i64 [ 0, %.lr.ph22 ], [ %indvars.iv.next31, %43 ]
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv30) #3
  %45 = load double, ptr %44, align 8, !tbaa !35
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %indvars.iv33) #3
  %47 = load double, ptr %46, align 8, !tbaa !35
  %48 = fmul double %45, %47
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = mul i32 %49, %39
  %51 = trunc nuw nsw i64 %indvars.iv30 to i32
  %52 = add i32 %50, %51
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %2, i64 %53
  store double %48, ptr %54, align 8, !tbaa !35
  %indvars.iv.next31 = add nuw nsw i64 %indvars.iv30, 1
  %55 = zext i32 %49 to i64
  %56 = icmp ult i64 %indvars.iv.next31, %55
  br i1 %56, label %43, label %._crit_edge, !llvm.loop !41
}

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

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

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 = { 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 #2 = { 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 #3 = { 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 68}
!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, !36, i64 0}
!36 = !{!"double", !8, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38, !40}
!40 = !{!"llvm.loop.unswitch.partial.disable"}
!41 = distinct !{!41, !38}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass