; 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::OpMemoryRequirements" = type { i64, i64, i64, i64 }
%"struct.Ani::ArrayView" = type { ptr, i64 }
%"struct.Ani::DenseMatrix.9" = type { ptr, i64, i64, 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 }

@_ZTISt13runtime_error = external constant ptr
@.str.6 = external hidden unnamed_addr constant [56 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 uwtable
define dso_local void @_ZNK3Ani12BaseFemSpace8applyDIVERNS_10AniMemoryXIdiEERNS_9ArrayViewIdEE(ptr dead_on_unwind noalias writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(296) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) unnamed_addr #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 ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"struct.Ani::OpMemoryRequirements", align 8
  %12 = alloca %"struct.Ani::ArrayView", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.Ani::DenseMatrix.9", align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  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
  %26 = load ptr, ptr %5, align 8
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i64 3
  %29 = load ptr, ptr %28, align 8
  %30 = call noundef i32 %29(ptr noundef nonnull align 8 dereferenceable(24) %26)
  %31 = icmp ne i32 %30, 3
  br i1 %31, label %32, label %39

32:                                               ; preds = %4
  %33 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef @.str.6)
          to label %34 unwind label %35

34:                                               ; preds = %32
  call void @__cxa_throw(ptr %33, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
  unreachable

35:                                               ; preds = %32
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %8, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %9, align 4
  call void @__cxa_free_exception(ptr %33) #7
  br label %392

39:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %40, i32 0, i32 4
  %42 = load i64, ptr %41, align 8, !tbaa !11
  store i64 %42, ptr %10, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %43, i32 0, i32 14
  %45 = load i64, ptr %44, align 8, !tbaa !19
  %46 = trunc i64 %45 to i32
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %47, i32 0, i32 15
  %49 = load i64, ptr %48, align 8, !tbaa !20
  %50 = trunc i64 %49 to i32
  %51 = load ptr, ptr %26, align 8, !tbaa !9
  %52 = getelementptr inbounds ptr, ptr %51, i64 11
  %53 = load ptr, ptr %52, align 8
  call void %53(ptr dead_on_unwind writable sret(%"struct.Ani::OpMemoryRequirements") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %26, i32 noundef %46, i32 noundef %50)
  %54 = getelementptr inbounds %"struct.Ani::OpMemoryRequirements", ptr %11, i32 0, i32 0
  %55 = load i64, ptr %54, align 8, !tbaa !21
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %56, i32 0, i32 12
  %58 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %57, i32 0, i32 1
  %59 = load i64, ptr %58, align 8, !tbaa !23
  %60 = sub i64 %59, %55
  store i64 %60, ptr %58, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %61, i32 0, i32 12
  %63 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !24
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %65, i32 0, i32 12
  %67 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %66, i32 0, i32 1
  %68 = load i64, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds double, ptr %64, i64 %68
  %70 = getelementptr inbounds %"struct.Ani::OpMemoryRequirements", ptr %11, i32 0, i32 0
  %71 = load i64, ptr %70, align 8, !tbaa !21
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %69, i64 noundef %71)
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = load ptr, ptr %26, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %73, i64 10
  %75 = load ptr, ptr %74, align 8
  call void %75(ptr dead_on_unwind writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(296) %72, ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %76 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %26, i32 0, i32 1
  %77 = call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %76)
  store i32 %77, ptr %13, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !27
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %81, i32 0, i32 14
  %83 = load i64, ptr %82, align 8, !tbaa !19
  %84 = mul i64 %83, 1
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %85, i32 0, i32 15
  %87 = load i64, ptr %86, align 8, !tbaa !20
  %88 = load i32, ptr %13, align 4, !tbaa !25
  %89 = zext i32 %88 to i64
  %90 = mul i64 %87, %89
  call void @_ZN3Ani11DenseMatrixIdEC2EPdmm(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %80, i64 noundef %84, i64 noundef %90)
  call void @_ZN3Ani11DenseMatrixIdE7SetZeroEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !18
  br label %91

91:                                               ; preds = %366, %39
  %92 = load i64, ptr %15, align 8, !tbaa !18
  %93 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 0
  %94 = load i64, ptr %93, align 8, !tbaa !28
  %95 = icmp ult i64 %92, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %91
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %369

97:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  %98 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !30
  %100 = load i64, ptr %15, align 8, !tbaa !18
  %101 = getelementptr inbounds i32, ptr %99, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !25
  %103 = icmp sge i32 0, %102
  br i1 %103, label %104, label %112

104:                                              ; preds = %97
  %105 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !30
  %107 = load i64, ptr %15, align 8, !tbaa !18
  %108 = add i64 %107, 1
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !25
  %111 = icmp slt i32 0, %110
  br label %112

112:                                              ; preds = %104, %97
  %113 = phi i1 [ false, %97 ], [ %111, %104 ]
  %114 = zext i1 %113 to i8
  store i8 %114, ptr %17, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  %115 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %116 = load ptr, ptr %115, align 8, !tbaa !30
  %117 = load i64, ptr %15, align 8, !tbaa !18
  %118 = getelementptr inbounds i32, ptr %116, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !25
  %120 = icmp sge i32 4, %119
  br i1 %120, label %121, label %129

121:                                              ; preds = %112
  %122 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !30
  %124 = load i64, ptr %15, align 8, !tbaa !18
  %125 = add i64 %124, 1
  %126 = getelementptr inbounds i32, ptr %123, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !25
  %128 = icmp slt i32 4, %127
  br label %129

129:                                              ; preds = %121, %112
  %130 = phi i1 [ false, %112 ], [ %128, %121 ]
  %131 = zext i1 %130 to i8
  store i8 %131, ptr %18, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  %132 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !30
  %134 = load i64, ptr %15, align 8, !tbaa !18
  %135 = getelementptr inbounds i32, ptr %133, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !25
  %137 = icmp sge i32 8, %136
  br i1 %137, label %138, label %146

138:                                              ; preds = %129
  %139 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %140 = load ptr, ptr %139, align 8, !tbaa !30
  %141 = load i64, ptr %15, align 8, !tbaa !18
  %142 = add i64 %141, 1
  %143 = getelementptr inbounds i32, ptr %140, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !25
  %145 = icmp slt i32 8, %144
  br label %146

146:                                              ; preds = %138, %129
  %147 = phi i1 [ false, %129 ], [ %145, %138 ]
  %148 = zext i1 %147 to i8
  store i8 %148, ptr %19, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %149 = load i8, ptr %17, align 1, !tbaa !31, !range !33, !noundef !34
  %150 = trunc i8 %149 to i1
  %151 = zext i1 %150 to i64
  %152 = select i1 %150, i32 1, i32 0
  %153 = load i8, ptr %18, align 1, !tbaa !31, !range !33, !noundef !34
  %154 = trunc i8 %153 to i1
  %155 = zext i1 %154 to i64
  %156 = select i1 %154, i32 1, i32 0
  %157 = add nsw i32 %152, %156
  %158 = load i8, ptr %19, align 1, !tbaa !31, !range !33, !noundef !34
  %159 = trunc i8 %158 to i1
  %160 = zext i1 %159 to i64
  %161 = select i1 %159, i32 1, i32 0
  %162 = add nsw i32 %157, %161
  store i32 %162, ptr %20, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %163 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %164 = load ptr, ptr %163, align 8, !tbaa !35
  %165 = load i64, ptr %15, align 8, !tbaa !18
  %166 = add i64 %165, 1
  %167 = getelementptr inbounds i32, ptr %164, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !25
  %169 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %170 = load ptr, ptr %169, align 8, !tbaa !35
  %171 = load i64, ptr %15, align 8, !tbaa !18
  %172 = getelementptr inbounds i32, ptr %170, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !25
  %174 = sub nsw i32 %168, %173
  store i32 %174, ptr %21, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %175 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %176 = load ptr, ptr %175, align 8, !tbaa !30
  %177 = load i64, ptr %15, align 8, !tbaa !18
  %178 = add i64 %177, 1
  %179 = getelementptr inbounds i32, ptr %176, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !25
  %181 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %182 = load ptr, ptr %181, align 8, !tbaa !30
  %183 = load i64, ptr %15, align 8, !tbaa !18
  %184 = getelementptr inbounds i32, ptr %182, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !25
  %186 = sub nsw i32 %180, %185
  store i32 %186, ptr %22, align 4, !tbaa !25
  %187 = load i32, ptr %20, align 4, !tbaa !25
  %188 = icmp sgt i32 %187, 0
  br i1 %188, label %189, label %365

189:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 0, ptr %23, align 8, !tbaa !18
  br label %190

190:                                              ; preds = %361, %189
  %191 = load i64, ptr %23, align 8, !tbaa !18
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %192, i32 0, i32 15
  %194 = load i64, ptr %193, align 8, !tbaa !20
  %195 = icmp ult i64 %191, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %190
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %364

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

198:                                              ; preds = %357, %197
  %199 = load i32, ptr %24, align 4, !tbaa !25
  %200 = load i32, ptr %21, align 4, !tbaa !25
  %201 = icmp slt i32 %199, %200
  br i1 %201, label %203, label %202

202:                                              ; preds = %198
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %360

203:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store i64 0, ptr %25, align 8, !tbaa !18
  br label %204

204:                                              ; preds = %353, %203
  %205 = load i64, ptr %25, align 8, !tbaa !18
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %206, i32 0, i32 14
  %208 = load i64, ptr %207, align 8, !tbaa !19
  %209 = icmp ult i64 %205, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %204
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %356

211:                                              ; preds = %204
  %212 = load i8, ptr %17, align 1, !tbaa !31, !range !33, !noundef !34
  %213 = trunc i8 %212 to i1
  br i1 %213, label %214, label %258

214:                                              ; preds = %211
  %215 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 1
  %216 = load ptr, ptr %215, align 8, !tbaa !36
  %217 = load i64, ptr %15, align 8, !tbaa !18
  %218 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %216, i64 %217
  %219 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %220 = load ptr, ptr %219, align 8, !tbaa !30
  %221 = load i64, ptr %15, align 8, !tbaa !18
  %222 = getelementptr inbounds i32, ptr %220, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !25
  %224 = sub nsw i32 0, %223
  %225 = sext i32 %224 to i64
  %226 = load i32, ptr %22, align 4, !tbaa !25
  %227 = sext i32 %226 to i64
  %228 = load i64, ptr %25, align 8, !tbaa !18
  %229 = mul i64 %227, %228
  %230 = add i64 %225, %229
  %231 = load i32, ptr %24, align 4, !tbaa !25
  %232 = sext i32 %231 to i64
  %233 = load i32, ptr %21, align 4, !tbaa !25
  %234 = sext i32 %233 to i64
  %235 = load i64, ptr %23, align 8, !tbaa !18
  %236 = mul i64 %234, %235
  %237 = add i64 %232, %236
  %238 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %218, i64 noundef %230, i64 noundef %237)
  %239 = load double, ptr %238, align 8, !tbaa !37
  %240 = load i64, ptr %25, align 8, !tbaa !18
  %241 = add i64 0, %240
  %242 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %243 = load ptr, ptr %242, align 8, !tbaa !35
  %244 = load i64, ptr %15, align 8, !tbaa !18
  %245 = getelementptr inbounds i32, ptr %243, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !25
  %247 = load i32, ptr %24, align 4, !tbaa !25
  %248 = add nsw i32 %246, %247
  %249 = sext i32 %248 to i64
  %250 = load i32, ptr %13, align 4, !tbaa !25
  %251 = zext i32 %250 to i64
  %252 = load i64, ptr %23, align 8, !tbaa !18
  %253 = mul i64 %251, %252
  %254 = add i64 %249, %253
  %255 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef %241, i64 noundef %254)
  %256 = load double, ptr %255, align 8, !tbaa !37
  %257 = fadd double %256, %239
  store double %257, ptr %255, align 8, !tbaa !37
  br label %258

258:                                              ; preds = %214, %211
  %259 = load i8, ptr %18, align 1, !tbaa !31, !range !33, !noundef !34
  %260 = trunc i8 %259 to i1
  br i1 %260, label %261, label %305

261:                                              ; preds = %258
  %262 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 1
  %263 = load ptr, ptr %262, align 8, !tbaa !36
  %264 = load i64, ptr %15, align 8, !tbaa !18
  %265 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %263, i64 %264
  %266 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %267 = load ptr, ptr %266, align 8, !tbaa !30
  %268 = load i64, ptr %15, align 8, !tbaa !18
  %269 = getelementptr inbounds i32, ptr %267, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !25
  %271 = sub nsw i32 4, %270
  %272 = sext i32 %271 to i64
  %273 = load i32, ptr %22, align 4, !tbaa !25
  %274 = sext i32 %273 to i64
  %275 = load i64, ptr %25, align 8, !tbaa !18
  %276 = mul i64 %274, %275
  %277 = add i64 %272, %276
  %278 = load i32, ptr %24, align 4, !tbaa !25
  %279 = sext i32 %278 to i64
  %280 = load i32, ptr %21, align 4, !tbaa !25
  %281 = sext i32 %280 to i64
  %282 = load i64, ptr %23, align 8, !tbaa !18
  %283 = mul i64 %281, %282
  %284 = add i64 %279, %283
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %265, i64 noundef %277, i64 noundef %284)
  %286 = load double, ptr %285, align 8, !tbaa !37
  %287 = load i64, ptr %25, align 8, !tbaa !18
  %288 = add i64 0, %287
  %289 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %290 = load ptr, ptr %289, align 8, !tbaa !35
  %291 = load i64, ptr %15, align 8, !tbaa !18
  %292 = getelementptr inbounds i32, ptr %290, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !25
  %294 = load i32, ptr %24, align 4, !tbaa !25
  %295 = add nsw i32 %293, %294
  %296 = sext i32 %295 to i64
  %297 = load i32, ptr %13, align 4, !tbaa !25
  %298 = zext i32 %297 to i64
  %299 = load i64, ptr %23, align 8, !tbaa !18
  %300 = mul i64 %298, %299
  %301 = add i64 %296, %300
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef %288, i64 noundef %301)
  %303 = load double, ptr %302, align 8, !tbaa !37
  %304 = fadd double %303, %286
  store double %304, ptr %302, align 8, !tbaa !37
  br label %305

305:                                              ; preds = %261, %258
  %306 = load i8, ptr %19, align 1, !tbaa !31, !range !33, !noundef !34
  %307 = trunc i8 %306 to i1
  br i1 %307, label %308, label %352

308:                                              ; preds = %305
  %309 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 1
  %310 = load ptr, ptr %309, align 8, !tbaa !36
  %311 = load i64, ptr %15, align 8, !tbaa !18
  %312 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %310, i64 %311
  %313 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %314 = load ptr, ptr %313, align 8, !tbaa !30
  %315 = load i64, ptr %15, align 8, !tbaa !18
  %316 = getelementptr inbounds i32, ptr %314, i64 %315
  %317 = load i32, ptr %316, align 4, !tbaa !25
  %318 = sub nsw i32 8, %317
  %319 = sext i32 %318 to i64
  %320 = load i32, ptr %22, align 4, !tbaa !25
  %321 = sext i32 %320 to i64
  %322 = load i64, ptr %25, align 8, !tbaa !18
  %323 = mul i64 %321, %322
  %324 = add i64 %319, %323
  %325 = load i32, ptr %24, align 4, !tbaa !25
  %326 = sext i32 %325 to i64
  %327 = load i32, ptr %21, align 4, !tbaa !25
  %328 = sext i32 %327 to i64
  %329 = load i64, ptr %23, align 8, !tbaa !18
  %330 = mul i64 %328, %329
  %331 = add i64 %326, %330
  %332 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %312, i64 noundef %324, i64 noundef %331)
  %333 = load double, ptr %332, align 8, !tbaa !37
  %334 = load i64, ptr %25, align 8, !tbaa !18
  %335 = add i64 0, %334
  %336 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %337 = load ptr, ptr %336, align 8, !tbaa !35
  %338 = load i64, ptr %15, align 8, !tbaa !18
  %339 = getelementptr inbounds i32, ptr %337, i64 %338
  %340 = load i32, ptr %339, align 4, !tbaa !25
  %341 = load i32, ptr %24, align 4, !tbaa !25
  %342 = add nsw i32 %340, %341
  %343 = sext i32 %342 to i64
  %344 = load i32, ptr %13, align 4, !tbaa !25
  %345 = zext i32 %344 to i64
  %346 = load i64, ptr %23, align 8, !tbaa !18
  %347 = mul i64 %345, %346
  %348 = add i64 %343, %347
  %349 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef %335, i64 noundef %348)
  %350 = load double, ptr %349, align 8, !tbaa !37
  %351 = fadd double %350, %333
  store double %351, ptr %349, align 8, !tbaa !37
  br label %352

352:                                              ; preds = %308, %305
  br label %353

353:                                              ; preds = %352
  %354 = load i64, ptr %25, align 8, !tbaa !18
  %355 = add i64 %354, 1
  store i64 %355, ptr %25, align 8, !tbaa !18
  br label %204, !llvm.loop !39

356:                                              ; preds = %210
  br label %357

357:                                              ; preds = %356
  %358 = load i32, ptr %24, align 4, !tbaa !25
  %359 = add nsw i32 %358, 1
  store i32 %359, ptr %24, align 4, !tbaa !25
  br label %198, !llvm.loop !41

360:                                              ; preds = %202
  br label %361

361:                                              ; preds = %360
  %362 = load i64, ptr %23, align 8, !tbaa !18
  %363 = add i64 %362, 1
  store i64 %363, ptr %23, align 8, !tbaa !18
  br label %190, !llvm.loop !42

364:                                              ; preds = %196
  br label %365

365:                                              ; preds = %364, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  br label %366

366:                                              ; preds = %365
  %367 = load i64, ptr %15, align 8, !tbaa !18
  %368 = add i64 %367, 1
  store i64 %368, ptr %15, align 8, !tbaa !18
  br label %91, !llvm.loop !43

369:                                              ; preds = %96
  %370 = getelementptr inbounds %"struct.Ani::OpMemoryRequirements", ptr %11, i32 0, i32 0
  %371 = load i64, ptr %370, align 8, !tbaa !21
  %372 = load ptr, ptr %6, align 8, !tbaa !5
  %373 = getelementptr inbounds %"struct.Ani::AniMemory", ptr %372, i32 0, i32 12
  %374 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %373, i32 0, i32 1
  %375 = load i64, ptr %374, align 8, !tbaa !23
  %376 = add i64 %375, %371
  store i64 %376, ptr %374, align 8, !tbaa !23
  %377 = load i64, ptr %10, align 8, !tbaa !18
  %378 = add i64 %377, 1
  %379 = load ptr, ptr %6, align 8, !tbaa !5
  %380 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %379, i32 0, i32 4
  store i64 %378, ptr %380, align 8, !tbaa !11
  %381 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 0
  store i64 1, ptr %381, align 8, !tbaa !28
  %382 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 1
  %383 = load ptr, ptr %382, align 8, !tbaa !36
  %384 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %383, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %384, ptr align 8 %14, i64 32, i1 false), !tbaa.struct !44
  %385 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 2
  %386 = load ptr, ptr %385, align 8, !tbaa !30
  %387 = getelementptr inbounds i32, ptr %386, i64 1
  store i32 3, ptr %387, align 4, !tbaa !25
  %388 = load i32, ptr %13, align 4, !tbaa !25
  %389 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %0, i32 0, i32 3
  %390 = load ptr, ptr %389, align 8, !tbaa !35
  %391 = getelementptr inbounds i32, ptr %390, i64 1
  store i32 %388, ptr %391, align 4, !tbaa !25
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  ret void

392:                                              ; preds = %35
  %393 = load ptr, ptr %8, align 8
  %394 = load i32, ptr %9, align 4
  %395 = insertvalue { ptr, i32 } poison, ptr %393, 0
  %396 = insertvalue { ptr, i32 } %395, i32 %394, 1
  resume { ptr, i32 } %396
}

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


; 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::OpMemoryRequirements" = type { i64, i64, i64, i64 }
%"struct.Ani::ArrayView" = type { ptr, i64 }
%"struct.Ani::DenseMatrix.9" = type { ptr, i64, i64, i64 }

@_ZTISt13runtime_error = external constant ptr
@.str.6 = external hidden unnamed_addr constant [56 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 uwtable
define dso_local void @_ZNK3Ani12BaseFemSpace8applyDIVERNS_10AniMemoryXIdiEERNS_9ArrayViewIdEE(ptr dead_on_unwind noalias writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(296) %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %3) unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.Ani::OpMemoryRequirements", align 8
  %6 = alloca %"struct.Ani::ArrayView", align 8
  %7 = alloca %"struct.Ani::DenseMatrix.9", align 8
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 24
  %10 = load ptr, ptr %9, align 8
  %11 = tail call noundef i32 %10(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not = icmp eq i32 %11, 3
  br i1 %.not, label %17, label %12

12:                                               ; preds = %4
  %13 = tail call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull @.str.6)
          to label %14 unwind label %15

14:                                               ; preds = %12
  tail call void @__cxa_throw(ptr nonnull %13, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #8
  unreachable

15:                                               ; preds = %12
  %16 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %13) #7
  resume { ptr, i32 } %16

17:                                               ; preds = %4
  %18 = getelementptr inbounds i8, ptr %2, i64 288
  %19 = load i64, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  %20 = getelementptr inbounds i8, ptr %2, i64 224
  %21 = load i64, ptr %20, align 8, !tbaa !17
  %22 = trunc i64 %21 to i32
  %23 = getelementptr inbounds i8, ptr %2, i64 232
  %24 = load i64, ptr %23, align 8, !tbaa !18
  %25 = trunc i64 %24 to i32
  %26 = load ptr, ptr %1, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 88
  %28 = load ptr, ptr %27, align 8
  call void %28(ptr dead_on_unwind nonnull writable sret(%"struct.Ani::OpMemoryRequirements") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %22, i32 noundef %25)
  %29 = load i64, ptr %5, align 8, !tbaa !19
  %30 = getelementptr inbounds i8, ptr %2, i64 192
  %31 = getelementptr inbounds i8, ptr %2, i64 200
  %32 = load i64, ptr %31, align 8, !tbaa !21
  %33 = sub i64 %32, %29
  store i64 %33, ptr %31, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %34 = load ptr, ptr %30, align 8, !tbaa !22
  %35 = getelementptr inbounds double, ptr %34, i64 %33
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %35, i64 noundef %29)
  %36 = load ptr, ptr %1, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 80
  %38 = load ptr, ptr %37, align 8
  call void %38(ptr dead_on_unwind writable sret(%"struct.Ani::BandDenseMatrixX") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(296) %2, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %39 = getelementptr inbounds i8, ptr %1, i64 8
  %40 = call noundef i32 @_ZNK3Ani4DofT6DofMap11NumDofOnTetEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  %41 = load ptr, ptr %3, align 8, !tbaa !23
  %42 = load i64, ptr %20, align 8, !tbaa !17
  %43 = load i64, ptr %23, align 8, !tbaa !18
  %44 = zext i32 %40 to i64
  %45 = mul i64 %43, %44
  call void @_ZN3Ani11DenseMatrixIdEC2EPdmm(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %41, i64 noundef %42, i64 noundef %45)
  call void @_ZN3Ani11DenseMatrixIdE7SetZeroEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
  %46 = load i64, ptr %0, align 8, !tbaa !24
  %.not99 = icmp eq i64 %46, 0
  br i1 %.not99, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %17
  %47 = getelementptr inbounds i8, ptr %0, i64 16
  %48 = getelementptr inbounds i8, ptr %0, i64 24
  %49 = getelementptr inbounds i8, ptr %0, i64 8
  br label %62

._crit_edge:                                      ; preds = %.loopexit, %17
  %50 = load i64, ptr %5, align 8, !tbaa !19
  %51 = load i64, ptr %31, align 8, !tbaa !21
  %52 = add i64 %51, %50
  store i64 %52, ptr %31, align 8, !tbaa !21
  %53 = add i64 %19, 1
  store i64 %53, ptr %18, align 8, !tbaa !8
  store i64 1, ptr %0, align 8, !tbaa !24
  %54 = getelementptr inbounds i8, ptr %0, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !26
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef nonnull align 8 dereferenceable(32) %7, i64 32, i1 false), !tbaa.struct !27
  %56 = getelementptr inbounds i8, ptr %0, i64 16
  %57 = load ptr, ptr %56, align 8, !tbaa !30
  %58 = getelementptr inbounds i8, ptr %57, i64 4
  store i32 3, ptr %58, align 4, !tbaa !31
  %59 = getelementptr inbounds i8, ptr %0, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !33
  %61 = getelementptr inbounds i8, ptr %60, i64 4
  store i32 %40, ptr %61, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  ret void

62:                                               ; preds = %.lr.ph, %.loopexit
  %63 = phi i64 [ %46, %.lr.ph ], [ %194, %.loopexit ]
  %.08397 = phi i64 [ 0, %.lr.ph ], [ %92, %.loopexit ]
  %64 = load ptr, ptr %47, align 8, !tbaa !30
  %65 = getelementptr inbounds i32, ptr %64, i64 %.08397
  %66 = load i32, ptr %65, align 4, !tbaa !31
  %67 = icmp slt i32 %66, 1
  br i1 %67, label %.thread, label %71

.thread:                                          ; preds = %62
  %68 = getelementptr i8, ptr %65, i64 4
  %69 = load i32, ptr %68, align 4, !tbaa !31
  %70 = icmp sgt i32 %69, 0
  br label %.thread86

71:                                               ; preds = %62
  %72 = icmp ult i32 %66, 5
  br i1 %72, label %..thread86_crit_edge, label %76

..thread86_crit_edge:                             ; preds = %71
  %.phi.trans.insert = getelementptr i8, ptr %65, i64 4
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !31
  br label %.thread86

.thread86:                                        ; preds = %..thread86_crit_edge, %.thread
  %73 = phi i32 [ %69, %.thread ], [ %.pre, %..thread86_crit_edge ]
  %74 = phi i1 [ %70, %.thread ], [ false, %..thread86_crit_edge ]
  %75 = icmp sgt i32 %73, 4
  br label %78

76:                                               ; preds = %71
  %77 = icmp ult i32 %66, 9
  br i1 %77, label %._crit_edge107, label %83

._crit_edge107:                                   ; preds = %76
  %.phi.trans.insert108 = getelementptr i8, ptr %65, i64 4
  %.pre109 = load i32, ptr %.phi.trans.insert108, align 4, !tbaa !31
  br label %78

78:                                               ; preds = %._crit_edge107, %.thread86
  %79 = phi i32 [ %73, %.thread86 ], [ %.pre109, %._crit_edge107 ]
  %80 = phi i1 [ %75, %.thread86 ], [ false, %._crit_edge107 ]
  %81 = phi i1 [ %74, %.thread86 ], [ false, %._crit_edge107 ]
  %82 = icmp sgt i32 %79, 8
  br label %83

83:                                               ; preds = %78, %76
  %84 = phi i1 [ false, %76 ], [ %80, %78 ]
  %85 = phi i1 [ false, %76 ], [ %81, %78 ]
  %86 = phi i1 [ false, %76 ], [ %82, %78 ]
  %87 = zext i1 %85 to i32
  %88 = zext i1 %84 to i32
  %89 = add nuw nsw i32 %87, %88
  %90 = zext i1 %86 to i32
  %91 = load ptr, ptr %48, align 8, !tbaa !33
  %92 = add nuw i64 %.08397, 1
  %93 = getelementptr inbounds i32, ptr %91, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !31
  %95 = getelementptr inbounds i32, ptr %91, i64 %.08397
  %96 = load i32, ptr %95, align 4, !tbaa !31
  %97 = sub i32 %94, %96
  %98 = or i32 %89, %90
  %.not85 = icmp ne i32 %98, 0
  %99 = load i64, ptr %23, align 8
  %100 = icmp ne i64 %99, 0
  %or.cond = select i1 %.not85, i1 %100, i1 false
  br i1 %or.cond, label %.preheader87.lr.ph, label %.loopexit

.preheader87.lr.ph:                               ; preds = %83
  %101 = getelementptr inbounds i32, ptr %64, i64 %92
  %102 = load i32, ptr %101, align 4, !tbaa !31
  %103 = sub nsw i32 %102, %66
  %104 = icmp sgt i32 %97, 0
  %105 = sext i32 %103 to i64
  %106 = sext i32 %97 to i64
  br i1 %104, label %.preheader87.lr.ph.split.us, label %.loopexit

.preheader87.lr.ph.split.us:                      ; preds = %.preheader87.lr.ph
  %107 = load i64, ptr %20, align 8, !tbaa !17
  %.not100 = icmp eq i64 %107, 0
  br i1 %.not100, label %.loopexit, label %.preheader87.us.preheader

.preheader87.us.preheader:                        ; preds = %.preheader87.lr.ph.split.us
  %wide.trip.count = zext nneg i32 %97 to i64
  br label %.preheader87.us

.preheader87.us:                                  ; preds = %.preheader87.us.preheader, %._crit_edge91.us
  %108 = phi i64 [ %189, %._crit_edge91.us ], [ %99, %.preheader87.us.preheader ]
  %109 = phi i64 [ %190, %._crit_edge91.us ], [ %107, %.preheader87.us.preheader ]
  %110 = phi i64 [ %191, %._crit_edge91.us ], [ 1, %.preheader87.us.preheader ]
  %.08292.us = phi i64 [ %192, %._crit_edge91.us ], [ 0, %.preheader87.us.preheader ]
  %111 = mul i64 %.08292.us, %106
  %112 = mul i64 %.08292.us, %44
  %.not101 = icmp eq i64 %110, 0
  br i1 %.not101, label %._crit_edge91.us, label %.preheader.us93

._crit_edge.us:                                   ; preds = %180, %.preheader.us93
  %113 = phi i64 [ 0, %.preheader.us93 ], [ %182, %180 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge91.us.loopexit103, label %.preheader.us93, !llvm.loop !34

114:                                              ; preds = %.lr.ph.us, %180
  %.089.us = phi i64 [ 0, %.lr.ph.us ], [ %181, %180 ]
  br i1 %85, label %115, label %136

115:                                              ; preds = %114
  %116 = load ptr, ptr %49, align 8, !tbaa !26
  %117 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %116, i64 %.08397
  %118 = load ptr, ptr %47, align 8, !tbaa !30
  %119 = getelementptr inbounds i32, ptr %118, i64 %.08397
  %120 = load i32, ptr %119, align 4, !tbaa !31
  %121 = sub nsw i32 0, %120
  %122 = sext i32 %121 to i64
  %123 = mul i64 %.089.us, %105
  %124 = add i64 %123, %122
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %117, i64 noundef %124, i64 noundef %185)
  %126 = load double, ptr %125, align 8, !tbaa !37
  %127 = load ptr, ptr %48, align 8, !tbaa !33
  %128 = getelementptr inbounds i32, ptr %127, i64 %.08397
  %129 = load i32, ptr %128, align 4, !tbaa !31
  %130 = add nsw i32 %129, %186
  %131 = sext i32 %130 to i64
  %132 = add i64 %112, %131
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef %.089.us, i64 noundef %132)
  %134 = load double, ptr %133, align 8, !tbaa !37
  %135 = fadd double %126, %134
  store double %135, ptr %133, align 8, !tbaa !37
  br label %136

136:                                              ; preds = %115, %114
  br i1 %84, label %137, label %158

137:                                              ; preds = %136
  %138 = load ptr, ptr %49, align 8, !tbaa !26
  %139 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %138, i64 %.08397
  %140 = load ptr, ptr %47, align 8, !tbaa !30
  %141 = getelementptr inbounds i32, ptr %140, i64 %.08397
  %142 = load i32, ptr %141, align 4, !tbaa !31
  %143 = sub nsw i32 4, %142
  %144 = sext i32 %143 to i64
  %145 = mul i64 %.089.us, %105
  %146 = add i64 %145, %144
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %139, i64 noundef %146, i64 noundef %185)
  %148 = load double, ptr %147, align 8, !tbaa !37
  %149 = load ptr, ptr %48, align 8, !tbaa !33
  %150 = getelementptr inbounds i32, ptr %149, i64 %.08397
  %151 = load i32, ptr %150, align 4, !tbaa !31
  %152 = add nsw i32 %151, %187
  %153 = sext i32 %152 to i64
  %154 = add i64 %112, %153
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef %.089.us, i64 noundef %154)
  %156 = load double, ptr %155, align 8, !tbaa !37
  %157 = fadd double %148, %156
  store double %157, ptr %155, align 8, !tbaa !37
  br label %158

158:                                              ; preds = %137, %136
  br i1 %86, label %159, label %180

159:                                              ; preds = %158
  %160 = load ptr, ptr %49, align 8, !tbaa !26
  %161 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %160, i64 %.08397
  %162 = load ptr, ptr %47, align 8, !tbaa !30
  %163 = getelementptr inbounds i32, ptr %162, i64 %.08397
  %164 = load i32, ptr %163, align 4, !tbaa !31
  %165 = sub nsw i32 8, %164
  %166 = sext i32 %165 to i64
  %167 = mul i64 %.089.us, %105
  %168 = add i64 %167, %166
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %161, i64 noundef %168, i64 noundef %185)
  %170 = load double, ptr %169, align 8, !tbaa !37
  %171 = load ptr, ptr %48, align 8, !tbaa !33
  %172 = getelementptr inbounds i32, ptr %171, i64 %.08397
  %173 = load i32, ptr %172, align 4, !tbaa !31
  %174 = add nsw i32 %173, %188
  %175 = sext i32 %174 to i64
  %176 = add i64 %112, %175
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3Ani11DenseMatrixIdEclEmm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef %.089.us, i64 noundef %176)
  %178 = load double, ptr %177, align 8, !tbaa !37
  %179 = fadd double %170, %178
  store double %179, ptr %177, align 8, !tbaa !37
  br label %180

180:                                              ; preds = %159, %158
  %181 = add nuw i64 %.089.us, 1
  %182 = load i64, ptr %20, align 8, !tbaa !17
  %183 = icmp ult i64 %181, %182
  br i1 %183, label %114, label %._crit_edge.us, !llvm.loop !39

.preheader.us93:                                  ; preds = %.preheader87.us, %._crit_edge.us
  %184 = phi i64 [ %113, %._crit_edge.us ], [ %109, %.preheader87.us ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge.us ], [ 0, %.preheader87.us ]
  %.not102 = icmp eq i64 %184, 0
  br i1 %.not102, label %._crit_edge.us, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.preheader.us93
  %185 = add i64 %111, %indvars.iv
  %186 = trunc nuw nsw i64 %indvars.iv to i32
  %187 = trunc nuw nsw i64 %indvars.iv to i32
  %188 = trunc nuw nsw i64 %indvars.iv to i32
  br label %114

._crit_edge91.us.loopexit103:                     ; preds = %._crit_edge.us
  %.pre110 = load i64, ptr %23, align 8, !tbaa !18
  br label %._crit_edge91.us

._crit_edge91.us:                                 ; preds = %.preheader87.us, %._crit_edge91.us.loopexit103
  %189 = phi i64 [ %.pre110, %._crit_edge91.us.loopexit103 ], [ %108, %.preheader87.us ]
  %190 = phi i64 [ %113, %._crit_edge91.us.loopexit103 ], [ %109, %.preheader87.us ]
  %191 = phi i64 [ %113, %._crit_edge91.us.loopexit103 ], [ 0, %.preheader87.us ]
  %192 = add nuw i64 %.08292.us, 1
  %193 = icmp ult i64 %192, %189
  br i1 %193, label %.preheader87.us, label %.loopexit.loopexit104, !llvm.loop !40

.loopexit.loopexit104:                            ; preds = %._crit_edge91.us
  %.pre111 = load i64, ptr %0, align 8, !tbaa !24
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader87.lr.ph, %.preheader87.lr.ph.split.us, %.loopexit.loopexit104, %83
  %194 = phi i64 [ %.pre111, %.loopexit.loopexit104 ], [ %63, %83 ], [ %63, %.preheader87.lr.ph.split.us ], [ %63, %.preheader87.lr.ph ]
  %195 = icmp ult i64 %92, %194
  br i1 %195, label %62, label %._crit_edge, !llvm.loop !41
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Ani11DenseMatrixIdE7SetZeroEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6 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, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !14, i64 288}
!9 = !{!"_ZTSN3Ani10AniMemoryXIdiEE", !10, i64 0, !16, i64 240, !15, i64 256, !15, i64 272, !14, i64 288}
!10 = !{!"_ZTSN3Ani9AniMemoryIdiEE", !11, i64 0, !11, i64 16, !11, i64 32, !11, i64 48, !11, i64 64, !11, i64 80, !11, i64 96, !11, i64 112, !11, i64 128, !11, i64 144, !11, i64 160, !11, i64 176, !11, i64 192, !15, i64 208, !14, i64 224, !14, i64 232}
!11 = !{!"_ZTSN3Ani9ArrayViewIdEE", !12, i64 0, !14, i64 8}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"long", !13, i64 0}
!15 = !{!"_ZTSN3Ani9ArrayViewIiEE", !12, i64 0, !14, i64 8}
!16 = !{!"_ZTSN3Ani9ArrayViewINS_11DenseMatrixIdEEEE", !12, i64 0, !14, i64 8}
!17 = !{!10, !14, i64 224}
!18 = !{!10, !14, i64 232}
!19 = !{!20, !14, i64 0}
!20 = !{!"_ZTSN3Ani20OpMemoryRequirementsE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!21 = !{!10, !14, i64 200}
!22 = !{!10, !12, i64 192}
!23 = !{!11, !12, i64 0}
!24 = !{!25, !14, i64 0}
!25 = !{!"_ZTSN3Ani16BandDenseMatrixXIdiEE", !14, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!26 = !{!25, !12, i64 8}
!27 = !{i64 0, i64 8, !28, i64 8, i64 8, !29, i64 16, i64 8, !29, i64 24, i64 8, !29}
!28 = !{!12, !12, i64 0}
!29 = !{!14, !14, i64 0}
!30 = !{!25, !12, i64 16}
!31 = !{!32, !32, i64 0}
!32 = !{!"int", !13, i64 0}
!33 = !{!25, !12, i64 24}
!34 = distinct !{!34, !35, !36}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!"llvm.loop.unswitch.partial.disable"}
!37 = !{!38, !38, i64 0}
!38 = !{!"double", !13, i64 0}
!39 = distinct !{!39, !35}
!40 = distinct !{!40, !35, !36}
!41 = distinct !{!41, !35}


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