; LLVM IR from INMOST-DEV/INMOST-FEM :: anifem++/fem/fem_space.ll (ZNK3Ani13UnionFemSpace18evalBasisFunctionsERKNS_4ExprES3_PS1_)

; 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.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl" }
%"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl" = type { %"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.13" = type { i8 }
%"struct.Ani::Expr" = type { ptr, %"class.std::shared_ptr.16" }
%"class.std::shared_ptr.16" = type { %"class.std::__shared_ptr.17" }
%"class.std::__shared_ptr.17" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.Ani::UnionFemSpace" = type { %"struct.Ani::BaseFemSpace", %"class.std::vector.31", %"class.std::vector.55" }
%"struct.Ani::BaseFemSpace" = type { ptr, %"struct.Ani::DofT::DofMap" }
%"struct.Ani::DofT::DofMap" = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.55" = type { %"struct.std::_Vector_base.56" }
%"struct.std::_Vector_base.56" = 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 }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani4ExprD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani13UnionFemSpace18evalBasisFunctionsERKNS_4ExprES3_PS1_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef %3) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector.11", align 8
  %13 = alloca %"class.std::allocator.13", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.Ani::Expr", align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %51, %4
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %19, i32 0, i32 1
  %24 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %25 = icmp ult i64 %22, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %54

27:                                               ; preds = %20
  %28 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %19, i32 0, i32 1
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %30) #5
  %32 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %31) #5
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds %"struct.Ani::Expr", ptr %35, i64 %37
  %39 = load ptr, ptr %32, align 8, !tbaa !11
  %40 = getelementptr inbounds ptr, ptr %39, i64 5
  %41 = load ptr, ptr %40, align 8
  call void %41(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef %38)
  %42 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %19, i32 0, i32 1
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = zext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %44) #5
  %46 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %45) #5
  %47 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %46, i32 0, i32 1
  %48 = call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %47)
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = add i32 %49, %48
  store i32 %50, ptr %10, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %27
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = add i32 %52, 1
  store i32 %53, ptr %9, align 4, !tbaa !9
  br label %20, !llvm.loop !13

54:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %55 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %19, i32 0, i32 1
  %56 = call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %55)
  store i32 %56, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaIN3Ani4ExprEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt6vectorIN3Ani4ExprESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %58, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %59 unwind label %65

59:                                               ; preds = %54
  call void @_ZNSt15__new_allocatorIN3Ani4ExprEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %88, %59
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = icmp ult i32 %61, %62
  br i1 %63, label %69, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %100

65:                                               ; preds = %54
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %14, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %15, align 4
  call void @_ZNSt15__new_allocatorIN3Ani4ExprEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %125

69:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds %"struct.Ani::Expr", ptr %71, i64 %73
  %75 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %19, i32 0, i32 2
  %76 = call noundef ptr @_ZNKSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #5
  %77 = load i32, ptr %16, align 4, !tbaa !9
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = mul i32 %77, %78
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %76, i64 %80
  invoke void @_ZN3Ani2FT7scalsumEPKNS_4ExprES3_PKd(ptr dead_on_unwind writable sret(%"struct.Ani::Expr") align 8 %17, ptr noundef %70, ptr noundef %74, ptr noundef %81)
          to label %82 unwind label %91

82:                                               ; preds = %69
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3Ani4ExprESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %84) #5
  %86 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Ani4ExpraSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %85, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %87 unwind label %95

87:                                               ; preds = %82
  call void @_ZN3Ani4ExprD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %16, align 4, !tbaa !9
  %90 = add i32 %89, 1
  store i32 %90, ptr %16, align 4, !tbaa !9
  br label %60, !llvm.loop !15

91:                                               ; preds = %69
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %14, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %15, align 4
  br label %99

95:                                               ; preds = %82
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %14, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %15, align 4
  call void @_ZN3Ani4ExprD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %99

99:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %124

100:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %116, %100
  %102 = load i32, ptr %18, align 4, !tbaa !9
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = icmp ult i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %123

106:                                              ; preds = %101
  %107 = load i32, ptr %18, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3Ani4ExprESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %108) #5
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = load i32, ptr %18, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds %"struct.Ani::Expr", ptr %110, i64 %112
  %114 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Ani4ExpraSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %113, ptr noundef nonnull align 8 dereferenceable(24) %109)
          to label %115 unwind label %119

115:                                              ; preds = %106
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = add i32 %117, 1
  store i32 %118, ptr %18, align 4, !tbaa !9
  br label %101, !llvm.loop !16

119:                                              ; preds = %106
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %14, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %124

123:                                              ; preds = %105
  call void @_ZNSt6vectorIN3Ani4ExprESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void

124:                                              ; preds = %119, %99
  call void @_ZNSt6vectorIN3Ani4ExprESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %125

125:                                              ; preds = %124, %65
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %14, align 8
  %128 = load i32, ptr %15, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIN3Ani4ExprEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3Ani4ExprESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3Ani2FT7scalsumEPKNS_4ExprES3_PKd(ptr dead_on_unwind noalias writable sret(%"struct.Ani::Expr") align 8, ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIN3Ani4ExprEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl" }
%"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl" = type { %"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Ani::Expr, std::allocator<Ani::Expr>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.13" = type { i8 }
%"struct.Ani::Expr" = type { ptr, %"class.std::shared_ptr.16" }
%"class.std::shared_ptr.16" = type { %"class.std::__shared_ptr.17" }
%"class.std::__shared_ptr.17" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani4ExprD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani13UnionFemSpace18evalBasisFunctionsERKNS_4ExprES3_PS1_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef %3) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector.11", align 8
  %6 = alloca %"class.std::allocator.13", align 1
  %7 = alloca %"struct.Ani::Expr", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %4
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = tail call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %12 = zext i32 %11 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIN3Ani4ExprEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIN3Ani4ExprESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %30 unwind label %33

.lr.ph:                                           ; preds = %4, %.lr.ph
  %13 = phi i64 [ %27, %.lr.ph ], [ 0, %4 ]
  %.03036 = phi i32 [ %26, %.lr.ph ], [ 0, %4 ]
  %.03135 = phi i32 [ %25, %.lr.ph ], [ 0, %4 ]
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %13) #5
  %15 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  %16 = zext i32 %.03135 to i64
  %17 = getelementptr inbounds %"struct.Ani::Expr", ptr %3, i64 %16
  %18 = load ptr, ptr %15, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 40
  %20 = load ptr, ptr %19, align 8
  tail call void %20(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef %17)
  %21 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %13) #5
  %22 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = tail call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
  %25 = add i32 %24, %.03135
  %26 = add i32 %.03036, 1
  %27 = zext i32 %26 to i64
  %28 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %29 = icmp ugt i64 %28, %27
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !8

30:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIN3Ani4ExprEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  %.not43 = icmp eq i32 %11, 0
  br i1 %.not43, label %._crit_edge42, label %.lr.ph39

.lr.ph39:                                         ; preds = %30
  %31 = getelementptr inbounds %"struct.Ani::Expr", ptr %3, i64 %12
  %32 = getelementptr inbounds i8, ptr %0, i64 48
  br label %35

.preheader:                                       ; preds = %41
  br i1 %.not43, label %._crit_edge42, label %.lr.ph41

33:                                               ; preds = %._crit_edge
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN3Ani4ExprEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %49

35:                                               ; preds = %.lr.ph39, %41
  %indvars.iv = phi i64 [ 0, %.lr.ph39 ], [ %indvars.iv.next, %41 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  %36 = call noundef ptr @_ZNKSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  %37 = trunc nuw i64 %indvars.iv to i32
  %38 = mul i32 %11, %37
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %36, i64 %39
  invoke void @_ZN3Ani2FT7scalsumEPKNS_4ExprES3_PKd(ptr dead_on_unwind nonnull writable sret(%"struct.Ani::Expr") align 8 %7, ptr noundef %3, ptr noundef nonnull %31, ptr noundef %40)
          to label %41 unwind label %44

41:                                               ; preds = %35
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3Ani4ExprESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #5
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Ani4ExpraSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @_ZN3Ani4ExprD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %12
  br i1 %exitcond.not, label %.preheader, label %35, !llvm.loop !10

44:                                               ; preds = %35
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIN3Ani4ExprESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %49

._crit_edge42:                                    ; preds = %.lr.ph41, %30, %.preheader
  call void @_ZNSt6vectorIN3Ani4ExprESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  ret void

.lr.ph41:                                         ; preds = %.preheader, %.lr.ph41
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %.lr.ph41 ], [ 0, %.preheader ]
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3Ani4ExprESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv46) #5
  %47 = getelementptr inbounds %"struct.Ani::Expr", ptr %3, i64 %indvars.iv46
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Ani4ExpraSEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 8 dereferenceable(24) %46)
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond50.not = icmp eq i64 %indvars.iv.next47, %12
  br i1 %exitcond50.not, label %._crit_edge42, label %.lr.ph41, !llvm.loop !11

49:                                               ; preds = %44, %33
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIN3Ani4ExprEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3Ani4ExprESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3Ani2FT7scalsumEPKNS_4ExprES3_PKd(ptr dead_on_unwind noalias writable sret(%"struct.Ani::Expr") align 8, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIN3Ani4ExprEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}


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