; LLVM IR from marcinlos/iga-ads :: src/ads/form_matrix.ll (ZN3ads14gram_matrix_1dERNS_3lin11band_matrixERKNS_10basis_dataE)

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

%"struct.ads::basis_data" = type { %"class.std::vector", %"class.std::vector.0", i32, i32, i32, i32, i32, i32, %"class.std::vector.5", %"struct.ads::bspline::basis", ptr, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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 }
%"struct.ads::bspline::basis" = type { %"class.std::vector.5", i32, %"class.std::vector.5" }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ads14gram_matrix_1dERNS_3lin11band_matrixERKNS_10basis_dataE(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 8 dereferenceable(184) %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %130, %2
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.ads::basis_data", ptr %18, i32 0, i32 3
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = icmp slt i32 %17, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %16
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %133

23:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %126, %23
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.ads::basis_data", ptr %26, i32 0, i32 6
  %28 = load i32, ptr %27, align 8, !tbaa !26
  %29 = icmp slt i32 %25, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %129

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = call noundef i32 @_ZNK3ads10basis_data9first_dofEi(ptr noundef nonnull align 8 dereferenceable(184) %32, i32 noundef %33)
  store i32 %34, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = call noundef i32 @_ZNK3ads10basis_data8last_dofEi(ptr noundef nonnull align 8 dereferenceable(184) %35, i32 noundef %36)
  store i32 %37, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %122, %31
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = add nsw i32 %39, %40
  %42 = load i32, ptr %9, align 4, !tbaa !9
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %38
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %125

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %118, %45
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = add nsw i32 %47, %48
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %46
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %121

53:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = add nsw i32 %54, %55
  store i32 %56, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = add nsw i32 %57, %58
  store i32 %59, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.ads::basis_data", ptr %60, i32 0, i32 10
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds ptr, ptr %62, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds ptr, ptr %70, i64 0
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %72, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !28
  store double %76, ptr %14, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.ads::basis_data", ptr %77, i32 0, i32 10
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds ptr, ptr %79, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds ptr, ptr %83, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = getelementptr inbounds ptr, ptr %87, i64 0
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !28
  store double %93, ptr %15, align 8, !tbaa !28
  %94 = load double, ptr %14, align 8, !tbaa !28
  %95 = load double, ptr %15, align 8, !tbaa !28
  %96 = fmul double %94, %95
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.ads::basis_data", ptr %97, i32 0, i32 12
  %99 = load ptr, ptr %98, align 8, !tbaa !30
  %100 = load i32, ptr %7, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !28
  %104 = fmul double %96, %103
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.ads::basis_data", ptr %105, i32 0, i32 13
  %107 = load ptr, ptr %106, align 8, !tbaa !31
  %108 = load i32, ptr %5, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !28
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = load i32, ptr %13, align 4, !tbaa !9
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ads3lin11band_matrixclEii(ptr noundef nonnull align 8 dereferenceable(44) %112, i32 noundef %113, i32 noundef %114)
  %116 = load double, ptr %115, align 8, !tbaa !28
  %117 = call double @llvm.fmuladd.f64(double %104, double %111, double %116)
  store double %117, ptr %115, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %118

118:                                              ; preds = %53
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %11, align 4, !tbaa !9
  br label %46, !llvm.loop !32

121:                                              ; preds = %52
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %10, align 4, !tbaa !9
  br label %38, !llvm.loop !34

125:                                              ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %7, align 4, !tbaa !9
  br label %24, !llvm.loop !35

129:                                              ; preds = %30
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %5, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %5, align 4, !tbaa !9
  br label %16, !llvm.loop !36

133:                                              ; preds = %22
  ret void
}

; 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 i32 @_ZNK3ads10basis_data9first_dofEi(ptr noundef nonnull align 8 dereferenceable(184), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3ads10basis_data8last_dofEi(ptr noundef nonnull align 8 dereferenceable(184), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ads3lin11band_matrixclEii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef) #0 align 2

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

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 52}
!12 = !{!"_ZTSN3ads10basis_dataE", !13, i64 0, !17, i64 24, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !21, i64 72, !25, i64 96, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSN3ads7bspline5basisE", !21, i64 0, !10, i64 24, !21, i64 32}
!26 = !{!12, !10, i64 64}
!27 = !{!12, !6, i64 152}
!28 = !{!29, !29, i64 0}
!29 = !{!"double", !7, i64 0}
!30 = !{!12, !6, i64 168}
!31 = !{!12, !6, i64 176}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !33}


; 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 uwtable
define dso_local void @_ZN3ads14gram_matrix_1dERNS_3lin11band_matrixERKNS_10basis_dataE(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 8 dereferenceable(184) %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 52
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.preheader45.lr.ph, label %._crit_edge54

.preheader45.lr.ph:                               ; preds = %2
  %6 = getelementptr inbounds i8, ptr %1, i64 64
  %7 = getelementptr inbounds i8, ptr %1, i64 152
  %8 = getelementptr inbounds i8, ptr %1, i64 168
  %9 = getelementptr inbounds i8, ptr %1, i64 176
  %10 = load i32, ptr %6, align 8, !tbaa !24
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.preheader45, label %._crit_edge54

.preheader45:                                     ; preds = %.preheader45.lr.ph, %._crit_edge52
  %12 = phi i32 [ %16, %._crit_edge52 ], [ %4, %.preheader45.lr.ph ]
  %13 = phi i32 [ %17, %._crit_edge52 ], [ %10, %.preheader45.lr.ph ]
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %._crit_edge52 ], [ 0, %.preheader45.lr.ph ]
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge52

.lr.ph:                                           ; preds = %.preheader45
  %15 = trunc nuw nsw i64 %indvars.iv63 to i32
  br label %20

._crit_edge54:                                    ; preds = %._crit_edge52, %.preheader45.lr.ph, %2
  ret void

._crit_edge52.loopexit:                           ; preds = %._crit_edge50.split
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %._crit_edge52

._crit_edge52:                                    ; preds = %._crit_edge52.loopexit, %.preheader45
  %16 = phi i32 [ %.pre, %._crit_edge52.loopexit ], [ %12, %.preheader45 ]
  %17 = phi i32 [ %25, %._crit_edge52.loopexit ], [ %13, %.preheader45 ]
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %18 = sext i32 %16 to i64
  %19 = icmp slt i64 %indvars.iv.next64, %18
  br i1 %19, label %.preheader45, label %._crit_edge54, !llvm.loop !25

20:                                               ; preds = %.lr.ph, %._crit_edge50.split
  %indvars.iv60 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next61, %._crit_edge50.split ]
  %21 = tail call noundef i32 @_ZNK3ads10basis_data9first_dofEi(ptr noundef nonnull align 8 dereferenceable(184) %1, i32 noundef %15)
  %22 = tail call noundef i32 @_ZNK3ads10basis_data8last_dofEi(ptr noundef nonnull align 8 dereferenceable(184) %1, i32 noundef %15)
  %.not48 = icmp sgt i32 %21, %22
  br i1 %.not48, label %._crit_edge50.split, label %.preheader

.preheader:                                       ; preds = %20, %._crit_edge
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %._crit_edge ], [ 0, %20 ]
  %23 = trunc i64 %indvars.iv57 to i32
  %24 = add i32 %21, %23
  br label %30

._crit_edge50.split:                              ; preds = %._crit_edge, %20
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %25 = load i32, ptr %6, align 8, !tbaa !24
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next61, %26
  br i1 %27, label %20, label %._crit_edge52.loopexit, !llvm.loop !28

._crit_edge:                                      ; preds = %30
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %28 = trunc nuw i64 %indvars.iv.next58 to i32
  %29 = add nsw i32 %21, %28
  %.not = icmp sgt i32 %29, %22
  br i1 %.not, label %._crit_edge50.split, label %.preheader, !llvm.loop !29

30:                                               ; preds = %.preheader, %30
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %30 ]
  %31 = load ptr, ptr %7, align 8, !tbaa !30
  %32 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv63
  %33 = load ptr, ptr %32, align 8, !tbaa !31
  %34 = getelementptr inbounds ptr, ptr %33, i64 %indvars.iv60
  %35 = load ptr, ptr %34, align 8, !tbaa !31
  %36 = load ptr, ptr %35, align 8, !tbaa !31
  %37 = getelementptr inbounds double, ptr %36, i64 %indvars.iv57
  %38 = load double, ptr %37, align 8, !tbaa !32
  %39 = getelementptr inbounds double, ptr %36, i64 %indvars.iv
  %40 = load double, ptr %39, align 8, !tbaa !32
  %41 = fmul double %38, %40
  %42 = load ptr, ptr %8, align 8, !tbaa !34
  %43 = getelementptr inbounds double, ptr %42, i64 %indvars.iv60
  %44 = load double, ptr %43, align 8, !tbaa !32
  %45 = fmul double %41, %44
  %46 = load ptr, ptr %9, align 8, !tbaa !35
  %47 = getelementptr inbounds double, ptr %46, i64 %indvars.iv63
  %48 = load double, ptr %47, align 8, !tbaa !32
  %49 = trunc i64 %indvars.iv to i32
  %50 = add i32 %21, %49
  %51 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ads3lin11band_matrixclEii(ptr noundef nonnull align 8 dereferenceable(44) %0, i32 noundef %24, i32 noundef %50)
  %52 = load double, ptr %51, align 8, !tbaa !32
  %53 = tail call double @llvm.fmuladd.f64(double %45, double %48, double %52)
  store double %53, ptr %51, align 8, !tbaa !32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = trunc nuw i64 %indvars.iv.next to i32
  %55 = add nsw i32 %21, %54
  %.not44 = icmp sgt i32 %55, %22
  br i1 %.not44, label %._crit_edge, label %30, !llvm.loop !36
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ads10basis_data9first_dofEi(ptr noundef nonnull align 8 dereferenceable(184), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3ads10basis_data8last_dofEi(ptr noundef nonnull align 8 dereferenceable(184), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ads3lin11band_matrixclEii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !18, i64 52}
!6 = !{!"_ZTSN3ads10basis_dataE", !7, i64 0, !14, i64 24, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !18, i64 64, !18, i64 68, !19, i64 72, !23, i64 96, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176}
!7 = !{!"_ZTSSt6vectorIiSaIiEE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"int", !12, 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", !11, i64 0, !11, i64 8, !11, i64 16}
!23 = !{!"_ZTSN3ads7bspline5basisE", !19, i64 0, !18, i64 24, !19, i64 32}
!24 = !{!6, !18, i64 64}
!25 = distinct !{!25, !26, !27}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.unswitch.partial.disable"}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}
!30 = !{!6, !11, i64 152}
!31 = !{!11, !11, i64 0}
!32 = !{!33, !33, i64 0}
!33 = !{!"double", !12, i64 0}
!34 = !{!6, !11, i64 168}
!35 = !{!6, !11, i64 176}
!36 = distinct !{!36, !26}


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