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

; 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.Ani::BandDenseMatrixX" = type { i64, ptr, ptr, ptr }
%"struct.Ani::DenseMatrix.9" = type { ptr, i64, i64, i64 }
%"struct.Ani::OpMemoryRequirements" = type { i64, i64, i64, i64 }
%"struct.Ani::ArrayView" = type { ptr, i64 }
%"struct.Ani::AniMemoryX" = type { %"struct.Ani::AniMemory", %"struct.Ani::ArrayView.1", %"struct.Ani::ArrayView.0", %"struct.Ani::ArrayView.0", i64 }
%"struct.Ani::AniMemory" = type { %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView.0", i64, i64 }
%"struct.Ani::ArrayView.1" = type { ptr, i64 }
%"struct.Ani::ArrayView.0" = type { ptr, i64 }
%"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::__shared_count" = type { ptr }
%"struct.Ani::ComplexFemSpace" = type <{ %"struct.Ani::BaseFemSpace", %"class.std::vector.31", i32, i32, i32, i32, %"struct.std::array.36", [4 x i8] }>
%"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 }
%"struct.std::array.36" = type { [3 x i32] }
%"struct.Ani::DofT::ComplexDofMap" = type { %"struct.Ani::DofT::BaseDofMap", %"class.std::vector.37", %"struct.std::array.42", %"struct.std::array.42", %"class.std::vector.43" }
%"struct.Ani::DofT::BaseDofMap" = type { ptr }
%"class.std::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array.42" = type { [6 x %"class.std::vector.43"] }
%"class.std::vector.43" = type { %"struct.std::_Vector_base.44" }
%"struct.std::_Vector_base.44" = 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 }

@_ZTISt13runtime_error = external constant ptr
@.str.23 = external hidden unnamed_addr constant [62 x i8], align 1

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani11DenseMatrixIdEC2EPdmm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, i64 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) #5 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)) #5 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) #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani15ComplexFemSpace14applyDIV_1x1x1ERNS_10AniMemoryXIdiEERNS_9ArrayViewIdEE(ptr dead_on_unwind noalias writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %0, ptr noundef nonnull align 8 dereferenceable(76) %1, ptr noundef nonnull align 8 dereferenceable(296) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.Ani::DenseMatrix.9", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.Ani::OpMemoryRequirements", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.Ani::ArrayView", align 8
  %17 = alloca %"struct.Ani::BandDenseMatrixX", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.Ani::DenseMatrix.9", align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %26, i32 0, i32 4
  %28 = load i64, ptr %27, align 8, !tbaa !9
  store i64 %28, ptr %8, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %29 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %25, i32 0, i32 1
  %30 = call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %29)
  store i32 %30, ptr %9, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !19
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %34, i32 0, i32 14
  %36 = load i64, ptr %35, align 8, !tbaa !20
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %37, i32 0, i32 15
  %39 = load i64, ptr %38, align 8, !tbaa !21
  %40 = load i32, ptr %9, align 4, !tbaa !17
  %41 = zext i32 %40 to i64
  %42 = mul i64 %39, %41
  call void @_ZN3Ani11DenseMatrixIdEC2EPdmm(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef %33, i64 noundef %36, i64 noundef %42)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !17
  br label %43

43:                                               ; preds = %195, %4
  %44 = load i32, ptr %11, align 4, !tbaa !17
  %45 = icmp slt i32 %44, 3
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %198

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  %48 = getelementptr inbounds %"struct.Ani::ComplexFemSpace", ptr %25, i32 0, i32 1
  %49 = load i32, ptr %11, align 4, !tbaa !17
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #7
  %52 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %51) #7
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %53, i32 0, i32 14
  %55 = load i64, ptr %54, align 8, !tbaa !20
  %56 = trunc i64 %55 to i32
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %57, i32 0, i32 15
  %59 = load i64, ptr %58, align 8, !tbaa !21
  %60 = trunc i64 %59 to i32
  %61 = load i32, ptr %11, align 4, !tbaa !17
  %62 = trunc i32 %61 to i8
  %63 = load ptr, ptr %52, align 8, !tbaa !22
  %64 = getelementptr inbounds ptr, ptr %63, i64 19
  %65 = load ptr, ptr %64, align 8
  call void %65(ptr dead_on_unwind writable sret(%"struct.Ani::OpMemoryRequirements") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %52, i32 noundef %56, i32 noundef %60, i8 noundef zeroext %62)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %66 = getelementptr inbounds %"struct.Ani::ComplexFemSpace", ptr %25, i32 0, i32 1
  %67 = load i32, ptr %11, align 4, !tbaa !17
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #7
  %70 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %69) #7
  %71 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %70, i32 0, i32 1
  %72 = call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %71)
  store i32 %72, ptr %14, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %73 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %25, i32 0, i32 1
  %74 = call noundef ptr @_ZNK3Ani4DofT6DofMap6targetINS0_13ComplexDofMapEEEPKT_v(ptr noundef nonnull align 8 dereferenceable(16) %73)
  %75 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %74, i32 0, i32 4
  %76 = load i32, ptr %11, align 4, !tbaa !17
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %77) #7
  %79 = load i32, ptr %78, align 4, !tbaa !17
  store i32 %79, ptr %15, align 4, !tbaa !17
  %80 = getelementptr inbounds %"struct.Ani::OpMemoryRequirements", ptr %13, i32 0, i32 0
  %81 = load i64, ptr %80, align 8, !tbaa !24
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %82, i32 0, i32 12
  %84 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %83, i32 0, i32 1
  %85 = load i64, ptr %84, align 8, !tbaa !26
  %86 = sub i64 %85, %81
  store i64 %86, ptr %84, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %87, i32 0, i32 12
  %89 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !27
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %91, i32 0, i32 12
  %93 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %92, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !26
  %95 = getelementptr inbounds double, ptr %90, i64 %94
  %96 = getelementptr inbounds %"struct.Ani::OpMemoryRequirements", ptr %13, i32 0, i32 0
  %97 = load i64, ptr %96, align 8, !tbaa !24
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef %95, i64 noundef %97)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  %98 = getelementptr inbounds %"struct.Ani::ComplexFemSpace", ptr %25, i32 0, i32 1
  %99 = load i32, ptr %11, align 4, !tbaa !17
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %100) #7
  %102 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %101) #7
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i32, ptr %11, align 4, !tbaa !17
  %105 = trunc i32 %104 to i8
  %106 = load ptr, ptr %102, align 8, !tbaa !22
  %107 = getelementptr inbounds ptr, ptr %106, i64 18
  %108 = load ptr, ptr %107, align 8
  call void %108(ptr dead_on_unwind writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %102, ptr noundef nonnull align 8 dereferenceable(296) %103, ptr noundef nonnull align 8 dereferenceable(16) %16, i8 noundef zeroext %105)
  %109 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %17, i32 0, i32 0
  %110 = load i64, ptr %109, align 8, !tbaa !28
  %111 = icmp ne i64 %110, 1
  br i1 %111, label %112, label %126

112:                                              ; preds = %47
  %113 = getelementptr inbounds %"struct.Ani::OpMemoryRequirements", ptr %13, i32 0, i32 0
  %114 = load i64, ptr %113, align 8, !tbaa !24
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %115, i32 0, i32 12
  %117 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %116, i32 0, i32 1
  %118 = load i64, ptr %117, align 8, !tbaa !26
  %119 = add i64 %118, %114
  store i64 %119, ptr %117, align 8, !tbaa !26
  %120 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef @.str.23)
          to label %121 unwind label %122

121:                                              ; preds = %112
  call void @__cxa_throw(ptr %120, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
  unreachable

122:                                              ; preds = %112
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %18, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %19, align 4
  call void @__cxa_free_exception(ptr %120) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %251

126:                                              ; preds = %47
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  %127 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %17, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !30
  %129 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %128, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %129, i64 32, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 0, ptr %21, align 8, !tbaa !16
  br label %130

130:                                              ; preds = %181, %126
  %131 = load i64, ptr %21, align 8, !tbaa !16
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %132, i32 0, i32 15
  %134 = load i64, ptr %133, align 8, !tbaa !21
  %135 = icmp ult i64 %131, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %130
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %184

137:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !17
  br label %138

138:                                              ; preds = %177, %137
  %139 = load i32, ptr %22, align 4, !tbaa !17
  %140 = load i32, ptr %14, align 4, !tbaa !17
  %141 = icmp ult i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %180

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 0, ptr %23, align 8, !tbaa !16
  br label %144

144:                                              ; preds = %173, %143
  %145 = load i64, ptr %23, align 8, !tbaa !16
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %146, i32 0, i32 14
  %148 = load i64, ptr %147, align 8, !tbaa !20
  %149 = icmp ult i64 %145, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %144
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %176

151:                                              ; preds = %144
  %152 = load i64, ptr %23, align 8, !tbaa !16
  %153 = load i32, ptr %22, align 4, !tbaa !17
  %154 = zext i32 %153 to i64
  %155 = load i32, ptr %14, align 4, !tbaa !17
  %156 = zext i32 %155 to i64
  %157 = load i64, ptr %21, align 8, !tbaa !16
  %158 = mul i64 %156, %157
  %159 = add i64 %154, %158
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %20, i64 noundef %152, i64 noundef %159)
  %161 = load double, ptr %160, align 8, !tbaa !32
  %162 = load i64, ptr %23, align 8, !tbaa !16
  %163 = load i32, ptr %15, align 4, !tbaa !17
  %164 = load i32, ptr %22, align 4, !tbaa !17
  %165 = add i32 %163, %164
  %166 = zext i32 %165 to i64
  %167 = load i32, ptr %9, align 4, !tbaa !17
  %168 = zext i32 %167 to i64
  %169 = load i64, ptr %21, align 8, !tbaa !16
  %170 = mul i64 %168, %169
  %171 = add i64 %166, %170
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %10, i64 noundef %162, i64 noundef %171)
  store double %161, ptr %172, align 8, !tbaa !32
  br label %173

173:                                              ; preds = %151
  %174 = load i64, ptr %23, align 8, !tbaa !16
  %175 = add i64 %174, 1
  store i64 %175, ptr %23, align 8, !tbaa !16
  br label %144, !llvm.loop !34

176:                                              ; preds = %150
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %22, align 4, !tbaa !17
  %179 = add i32 %178, 1
  store i32 %179, ptr %22, align 4, !tbaa !17
  br label %138, !llvm.loop !36

180:                                              ; preds = %142
  br label %181

181:                                              ; preds = %180
  %182 = load i64, ptr %21, align 8, !tbaa !16
  %183 = add i64 %182, 1
  store i64 %183, ptr %21, align 8, !tbaa !16
  br label %130, !llvm.loop !37

184:                                              ; preds = %136
  %185 = getelementptr inbounds %"struct.Ani::OpMemoryRequirements", ptr %13, i32 0, i32 0
  %186 = load i64, ptr %185, align 8, !tbaa !24
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %187, i32 0, i32 12
  %189 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %188, i32 0, i32 1
  %190 = load i64, ptr %189, align 8, !tbaa !26
  %191 = add i64 %190, %186
  store i64 %191, ptr %189, align 8, !tbaa !26
  %192 = load i64, ptr %8, align 8, !tbaa !16
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %193, i32 0, i32 4
  store i64 %192, ptr %194, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %195

195:                                              ; preds = %184
  %196 = load i32, ptr %11, align 4, !tbaa !17
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %11, align 4, !tbaa !17
  br label %43, !llvm.loop !38

198:                                              ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %199, i32 0, i32 4
  %201 = load i64, ptr %200, align 8, !tbaa !9
  %202 = icmp ugt i64 %201, 0
  %203 = zext i1 %202 to i64
  %204 = select i1 %202, i32 1, i32 0
  store i32 %204, ptr %24, align 4, !tbaa !17
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %205, i32 0, i32 1
  %207 = getelementptr inbounds %"struct.Ani::ArrayView.1", ptr %206, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8, !tbaa !39
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %209, i32 0, i32 4
  %211 = load i64, ptr %210, align 8, !tbaa !9
  %212 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %208, i64 %211
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %213, i32 0, i32 2
  %215 = getelementptr inbounds %"struct.Ani::ArrayView.0", ptr %214, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !40
  %217 = load ptr, ptr %6, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %217, i32 0, i32 4
  %219 = load i64, ptr %218, align 8, !tbaa !9
  %220 = getelementptr inbounds i32, ptr %216, i64 %219
  %221 = load i32, ptr %24, align 4, !tbaa !17
  %222 = zext i32 %221 to i64
  %223 = getelementptr inbounds i32, ptr %220, i64 %222
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %224, i32 0, i32 3
  %226 = getelementptr inbounds %"struct.Ani::ArrayView.0", ptr %225, i32 0, i32 0
  %227 = load ptr, ptr %226, align 8, !tbaa !41
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %228, i32 0, i32 4
  %230 = load i64, ptr %229, align 8, !tbaa !9
  %231 = getelementptr inbounds i32, ptr %227, i64 %230
  %232 = load i32, ptr %24, align 4, !tbaa !17
  %233 = zext i32 %232 to i64
  %234 = getelementptr inbounds i32, ptr %231, i64 %233
  call void @_ZN3Ani16BandDenseMatrixXIdiEC2EmPNS_11DenseMatrixIdEEPiS5_(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 1, ptr noundef %212, ptr noundef %223, ptr noundef %234)
  %235 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 1
  %236 = load ptr, ptr %235, align 8, !tbaa !30
  %237 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %236, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %237, ptr align 8 %10, i64 32, i1 false), !tbaa.struct !31
  %238 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %239 = load ptr, ptr %238, align 8, !tbaa !42
  %240 = getelementptr inbounds i32, ptr %239, i64 1
  store i32 0, ptr %240, align 4, !tbaa !17
  %241 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %242 = load ptr, ptr %241, align 8, !tbaa !42
  %243 = getelementptr inbounds i32, ptr %242, i64 1
  store i32 1, ptr %243, align 4, !tbaa !17
  %244 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %245 = load ptr, ptr %244, align 8, !tbaa !43
  %246 = getelementptr inbounds i32, ptr %245, i64 1
  store i32 0, ptr %246, align 4, !tbaa !17
  %247 = load i32, ptr %9, align 4, !tbaa !17
  %248 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %249 = load ptr, ptr %248, align 8, !tbaa !43
  %250 = getelementptr inbounds i32, ptr %249, i64 1
  store i32 %247, ptr %250, align 4, !tbaa !17
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  ret void

251:                                              ; preds = %122
  %252 = load ptr, ptr %18, align 8
  %253 = load i32, ptr %19, align 4
  %254 = insertvalue { ptr, i32 } poison, ptr %252, 0
  %255 = insertvalue { ptr, i32 } %254, i32 %253, 1
  resume { ptr, i32 } %255
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani16BandDenseMatrixXIdiEC2EmPNS_11DenseMatrixIdEEPiS5_(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #5 align 2

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

!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, !13, i64 288}
!10 = !{!"_ZTSN3Ani10AniMemoryXIdiEE", !11, i64 0, !15, i64 240, !14, i64 256, !14, i64 272, !13, i64 288}
!11 = !{!"_ZTSN3Ani9AniMemoryIdiEE", !12, i64 0, !12, i64 16, !12, i64 32, !12, i64 48, !12, i64 64, !12, i64 80, !12, i64 96, !12, i64 112, !12, i64 128, !12, i64 144, !12, i64 160, !12, i64 176, !12, i64 192, !14, i64 208, !13, i64 224, !13, i64 232}
!12 = !{!"_ZTSN3Ani9ArrayViewIdEE", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN3Ani9ArrayViewIiEE", !6, i64 0, !13, i64 8}
!15 = !{!"_ZTSN3Ani9ArrayViewINS_11DenseMatrixIdEEEE", !6, i64 0, !13, i64 8}
!16 = !{!13, !13, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!12, !6, i64 0}
!20 = !{!11, !13, i64 224}
!21 = !{!11, !13, i64 232}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !8, i64 0}
!24 = !{!25, !13, i64 0}
!25 = !{!"_ZTSN3Ani20OpMemoryRequirementsE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!26 = !{!11, !13, i64 200}
!27 = !{!11, !6, i64 192}
!28 = !{!29, !13, i64 0}
!29 = !{!"_ZTSN3Ani16BandDenseMatrixXIdiEE", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!30 = !{!29, !6, i64 8}
!31 = !{i64 0, i64 8, !5, i64 8, i64 8, !16, i64 16, i64 8, !16, i64 24, i64 8, !16}
!32 = !{!33, !33, i64 0}
!33 = !{!"double", !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = distinct !{!37, !35}
!38 = distinct !{!38, !35}
!39 = !{!10, !6, i64 240}
!40 = !{!10, !6, i64 256}
!41 = !{!10, !6, i64 272}
!42 = !{!29, !6, i64 16}
!43 = !{!29, !6, i64 24}


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

%"struct.Ani::BandDenseMatrixX" = type { i64, ptr, ptr, ptr }
%"struct.Ani::DenseMatrix.9" = type { ptr, i64, i64, i64 }
%"struct.Ani::OpMemoryRequirements" = type { i64, i64, i64, i64 }
%"struct.Ani::ArrayView" = type { ptr, i64 }

@_ZTISt13runtime_error = external constant ptr
@.str.23 = external hidden unnamed_addr constant [62 x i8], align 1

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani11DenseMatrixIdEC2EPdmm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, i64 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) local_unnamed_addr #5 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 #5 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 #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani15ComplexFemSpace14applyDIV_1x1x1ERNS_10AniMemoryXIdiEERNS_9ArrayViewIdEE(ptr dead_on_unwind noalias writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %0, ptr noundef nonnull align 8 dereferenceable(76) %1, ptr noundef nonnull align 8 dereferenceable(296) %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %3) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.Ani::DenseMatrix.9", align 8
  %6 = alloca %"struct.Ani::OpMemoryRequirements", align 8
  %7 = alloca %"struct.Ani::ArrayView", align 8
  %8 = alloca %"struct.Ani::BandDenseMatrixX", align 8
  %9 = alloca %"struct.Ani::DenseMatrix.9", align 8
  %10 = getelementptr inbounds i8, ptr %2, i64 288
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = tail call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  %14 = load ptr, ptr %3, align 8, !tbaa !15
  %15 = getelementptr inbounds i8, ptr %2, i64 224
  %16 = load i64, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %2, i64 232
  %18 = load i64, ptr %17, align 8, !tbaa !17
  %19 = zext i32 %13 to i64
  %20 = mul i64 %18, %19
  call void @_ZN3Ani11DenseMatrixIdEC2EPdmm(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %14, i64 noundef %16, i64 noundef %20)
  %21 = getelementptr inbounds i8, ptr %1, i64 24
  %22 = getelementptr inbounds i8, ptr %2, i64 192
  %23 = getelementptr inbounds i8, ptr %2, i64 200
  %24 = getelementptr inbounds i8, ptr %8, i64 8
  br label %46

25:                                               ; preds = %._crit_edge63
  %.not = icmp ne i64 %11, 0
  %26 = getelementptr inbounds i8, ptr %2, i64 240
  %27 = load ptr, ptr %26, align 8, !tbaa !18
  %28 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %27, i64 %11
  %29 = getelementptr inbounds i8, ptr %2, i64 256
  %30 = load ptr, ptr %29, align 8, !tbaa !19
  %31 = getelementptr inbounds i32, ptr %30, i64 %11
  %32 = zext i1 %.not to i64
  %33 = getelementptr inbounds i32, ptr %31, i64 %32
  %34 = getelementptr inbounds i8, ptr %2, i64 272
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = getelementptr inbounds i32, ptr %35, i64 %11
  %37 = getelementptr inbounds i32, ptr %36, i64 %32
  call void @_ZN3Ani16BandDenseMatrixXIdiEC2EmPNS_11DenseMatrixIdEEPiS5_(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 1, ptr noundef %28, ptr noundef %33, ptr noundef %37)
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull align 8 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !23
  %40 = getelementptr inbounds i8, ptr %0, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %41, i64 4
  store i32 1, ptr %42, align 4, !tbaa !27
  %43 = getelementptr inbounds i8, ptr %0, i64 24
  %44 = load ptr, ptr %43, align 8, !tbaa !29
  %45 = getelementptr inbounds i8, ptr %44, i64 4
  store i32 %13, ptr %45, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  ret void

46:                                               ; preds = %4, %._crit_edge63
  %indvars.iv78 = phi i64 [ 0, %4 ], [ %indvars.iv.next79, %._crit_edge63 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv78) #7
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %47) #7
  %49 = load i64, ptr %15, align 8, !tbaa !16
  %50 = trunc i64 %49 to i32
  %51 = load i64, ptr %17, align 8, !tbaa !17
  %52 = trunc i64 %51 to i32
  %53 = trunc i64 %indvars.iv78 to i8
  %54 = load ptr, ptr %48, align 8, !tbaa !30
  %55 = getelementptr inbounds i8, ptr %54, i64 152
  %56 = load ptr, ptr %55, align 8
  call void %56(ptr dead_on_unwind nonnull writable sret(%"struct.Ani::OpMemoryRequirements") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %48, i32 noundef %50, i32 noundef %52, i8 noundef zeroext %53)
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv78) #7
  %58 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %57) #7
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  %60 = call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %59)
  %61 = call noundef ptr @_ZNK3Ani4DofT6DofMap6targetINS0_13ComplexDofMapEEEPKT_v(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %62 = getelementptr inbounds i8, ptr %61, i64 320
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %indvars.iv78) #7
  %64 = load i32, ptr %63, align 4, !tbaa !27
  %65 = load i64, ptr %6, align 8, !tbaa !32
  %66 = load i64, ptr %23, align 8, !tbaa !34
  %67 = sub i64 %66, %65
  store i64 %67, ptr %23, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %68 = load ptr, ptr %22, align 8, !tbaa !35
  %69 = getelementptr inbounds double, ptr %68, i64 %67
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef %69, i64 noundef %65)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv78) #7
  %71 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %70) #7
  %72 = load ptr, ptr %71, align 8, !tbaa !30
  %73 = getelementptr inbounds i8, ptr %72, i64 144
  %74 = load ptr, ptr %73, align 8
  call void %74(ptr dead_on_unwind nonnull writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(296) %2, ptr noundef nonnull align 8 dereferenceable(16) %7, i8 noundef zeroext %53)
  %75 = load i64, ptr %8, align 8, !tbaa !36
  %.not57 = icmp eq i64 %75, 1
  br i1 %.not57, label %84, label %76

76:                                               ; preds = %46
  %77 = load i64, ptr %6, align 8, !tbaa !32
  %78 = load i64, ptr %23, align 8, !tbaa !34
  %79 = add i64 %78, %77
  store i64 %79, ptr %23, align 8, !tbaa !34
  %80 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %80, ptr noundef nonnull @.str.23)
          to label %81 unwind label %82

81:                                               ; preds = %76
  call void @__cxa_throw(ptr nonnull %80, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #8
  unreachable

82:                                               ; preds = %76
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %80) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  resume { ptr, i32 } %83

84:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  %85 = load ptr, ptr %24, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %85, i64 32, i1 false), !tbaa.struct !23
  %86 = load i64, ptr %17, align 8, !tbaa !17
  %.not69 = icmp eq i64 %86, 0
  br i1 %.not69, label %._crit_edge63, label %.preheader58.lr.ph

.preheader58.lr.ph:                               ; preds = %84
  %.not70 = icmp eq i32 %60, 0
  %87 = zext i32 %60 to i64
  %88 = load i64, ptr %15, align 8
  %.not71 = icmp eq i64 %88, 0
  %or.cond = select i1 %.not70, i1 true, i1 %.not71
  br i1 %or.cond, label %._crit_edge63, label %.preheader58.us

.preheader58.us:                                  ; preds = %.preheader58.lr.ph, %._crit_edge61.us
  %89 = phi i64 [ %108, %._crit_edge61.us ], [ %86, %.preheader58.lr.ph ]
  %90 = phi i64 [ %109, %._crit_edge61.us ], [ %88, %.preheader58.lr.ph ]
  %91 = phi i64 [ %110, %._crit_edge61.us ], [ 1, %.preheader58.lr.ph ]
  %.05562.us = phi i64 [ %111, %._crit_edge61.us ], [ 0, %.preheader58.lr.ph ]
  %92 = mul i64 %.05562.us, %87
  %93 = mul i64 %.05562.us, %19
  %.not72 = icmp eq i64 %91, 0
  br i1 %.not72, label %._crit_edge61.us, label %.preheader.us64

._crit_edge.us:                                   ; preds = %95, %.preheader.us64
  %94 = phi i64 [ 0, %.preheader.us64 ], [ %100, %95 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %87
  br i1 %exitcond.not, label %._crit_edge61.us.loopexit74, label %.preheader.us64, !llvm.loop !37

95:                                               ; preds = %.lr.ph.us, %95
  %.05359.us = phi i64 [ 0, %.lr.ph.us ], [ %99, %95 ]
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %.05359.us, i64 noundef %103)
  %97 = load double, ptr %96, align 8, !tbaa !40
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %.05359.us, i64 noundef %107)
  store double %97, ptr %98, align 8, !tbaa !40
  %99 = add nuw i64 %.05359.us, 1
  %100 = load i64, ptr %15, align 8, !tbaa !16
  %101 = icmp ult i64 %99, %100
  br i1 %101, label %95, label %._crit_edge.us, !llvm.loop !42

.preheader.us64:                                  ; preds = %.preheader58.us, %._crit_edge.us
  %102 = phi i64 [ %94, %._crit_edge.us ], [ %90, %.preheader58.us ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge.us ], [ 0, %.preheader58.us ]
  %.not73 = icmp eq i64 %102, 0
  br i1 %.not73, label %._crit_edge.us, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.preheader.us64
  %103 = add i64 %92, %indvars.iv
  %104 = trunc nuw i64 %indvars.iv to i32
  %105 = add i32 %64, %104
  %106 = zext i32 %105 to i64
  %107 = add i64 %93, %106
  br label %95

._crit_edge61.us.loopexit74:                      ; preds = %._crit_edge.us
  %.pre = load i64, ptr %17, align 8, !tbaa !17
  br label %._crit_edge61.us

._crit_edge61.us:                                 ; preds = %.preheader58.us, %._crit_edge61.us.loopexit74
  %108 = phi i64 [ %.pre, %._crit_edge61.us.loopexit74 ], [ %89, %.preheader58.us ]
  %109 = phi i64 [ %94, %._crit_edge61.us.loopexit74 ], [ %90, %.preheader58.us ]
  %110 = phi i64 [ %94, %._crit_edge61.us.loopexit74 ], [ 0, %.preheader58.us ]
  %111 = add nuw i64 %.05562.us, 1
  %112 = icmp ult i64 %111, %108
  br i1 %112, label %.preheader58.us, label %._crit_edge63, !llvm.loop !43

._crit_edge63:                                    ; preds = %._crit_edge61.us, %.preheader58.lr.ph, %84
  %113 = load i64, ptr %6, align 8, !tbaa !32
  %114 = load i64, ptr %23, align 8, !tbaa !34
  %115 = add i64 %114, %113
  store i64 %115, ptr %23, align 8, !tbaa !34
  store i64 %11, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond81.not = icmp eq i64 %indvars.iv.next79, 3
  br i1 %exitcond81.not, label %25, label %46, !llvm.loop !44
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani16BandDenseMatrixXIdiEC2EmPNS_11DenseMatrixIdEEPiS5_(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, ptr noundef, ptr noundef, ptr noundef) unnamed_addr #5 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !12, i64 288}
!6 = !{!"_ZTSN3Ani10AniMemoryXIdiEE", !7, i64 0, !14, i64 240, !13, i64 256, !13, i64 272, !12, i64 288}
!7 = !{!"_ZTSN3Ani9AniMemoryIdiEE", !8, i64 0, !8, i64 16, !8, i64 32, !8, i64 48, !8, i64 64, !8, i64 80, !8, i64 96, !8, i64 112, !8, i64 128, !8, i64 144, !8, i64 160, !8, i64 176, !8, i64 192, !13, i64 208, !12, i64 224, !12, i64 232}
!8 = !{!"_ZTSN3Ani9ArrayViewIdEE", !9, i64 0, !12, i64 8}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSN3Ani9ArrayViewIiEE", !9, i64 0, !12, i64 8}
!14 = !{!"_ZTSN3Ani9ArrayViewINS_11DenseMatrixIdEEEE", !9, i64 0, !12, i64 8}
!15 = !{!8, !9, i64 0}
!16 = !{!7, !12, i64 224}
!17 = !{!7, !12, i64 232}
!18 = !{!6, !9, i64 240}
!19 = !{!6, !9, i64 256}
!20 = !{!6, !9, i64 272}
!21 = !{!22, !9, i64 8}
!22 = !{!"_ZTSN3Ani16BandDenseMatrixXIdiEE", !12, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!23 = !{i64 0, i64 8, !24, i64 8, i64 8, !25, i64 16, i64 8, !25, i64 24, i64 8, !25}
!24 = !{!9, !9, i64 0}
!25 = !{!12, !12, i64 0}
!26 = !{!22, !9, i64 16}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !10, i64 0}
!29 = !{!22, !9, i64 24}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !11, i64 0}
!32 = !{!33, !12, i64 0}
!33 = !{!"_ZTSN3Ani20OpMemoryRequirementsE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!34 = !{!7, !12, i64 200}
!35 = !{!7, !9, i64 192}
!36 = !{!22, !12, i64 0}
!37 = distinct !{!37, !38, !39}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!"llvm.loop.unswitch.partial.disable"}
!40 = !{!41, !41, i64 0}
!41 = !{!"double", !10, i64 0}
!42 = distinct !{!42, !38}
!43 = distinct !{!43, !38, !39}
!44 = distinct !{!44, !38}


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