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

; 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::DofT::LocalOrder" = type { i32, i32, i8, i8, i8, i8 }
%"struct.Ani::DofT::TetGeomSparsity::Pos" = type { i8, i8 }
%"struct.Ani::DofT::ComplexDofMap" = type { %"struct.Ani::DofT::BaseDofMap", %"class.std::vector", %"struct.std::array.8", %"struct.std::array.8", %"class.std::vector.9" }
%"struct.Ani::DofT::BaseDofMap" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.8" = type { [6 x %"class.std::vector.9"] }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = 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 }

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

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

; 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) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4), i8 noundef zeroext) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3Ani4DofT13GeomTypeToNumEh(i8 noundef zeroext) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3Ani4DofT10LocalOrderneERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani4DofT10LocalOrderC2Ejhhjhh(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #1 align 2

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

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

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

; 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) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani4DofT13ComplexDofMap19BeginByGeomSparsityERKNS0_15TetGeomSparsityERNS0_10LocalOrderEb(ptr noundef nonnull align 8 dereferenceable(344) %0, ptr noundef nonnull align 1 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, i1 noundef zeroext %3) unnamed_addr #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.Ani::DofT::LocalOrder", align 4
  %12 = alloca %"struct.Ani::DofT::LocalOrder", align 4
  %13 = alloca %"struct.Ani::DofT::LocalOrder", align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca %"struct.Ani::DofT::TetGeomSparsity::Pos", align 1
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %19 = zext i1 %3 to i8
  store i8 %19, ptr %8, align 1, !tbaa !9
  %20 = load ptr, ptr %5, align 8
  %21 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %22 = trunc i8 %21 to i1
  br i1 %22, label %97, label %23

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

24:                                               ; preds = %87, %23
  %25 = load i32, ptr %9, align 4, !tbaa !13
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 1
  %28 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #6
  %29 = icmp ult i64 %26, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  store i32 2, ptr %10, align 4
  br label %90

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  call void @_ZN3Ani4DofT10LocalOrderC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  call void @_ZN3Ani4DofT10LocalOrderC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12)
  %32 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 1
  %33 = load i32, ptr %9, align 4, !tbaa !13
  %34 = zext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %34) #6
  %36 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %35) #6
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = getelementptr inbounds ptr, ptr %37, i64 20
  %39 = load ptr, ptr %38, align 8
  call void %39(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %40 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 1
  %41 = load i32, ptr %9, align 4, !tbaa !13
  %42 = zext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %42) #6
  %44 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %43) #6
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %47 = trunc i8 %46 to i1
  %48 = load ptr, ptr %44, align 8, !tbaa !15
  %49 = getelementptr inbounds ptr, ptr %48, i64 19
  %50 = load ptr, ptr %49, align 8
  call void %50(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 1 dereferenceable(4) %45, ptr noundef nonnull align 4 dereferenceable(12) %11, i1 noundef zeroext %47)
  %51 = call noundef zeroext i1 @_ZNK3Ani4DofT10LocalOrderneERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %12)
  br i1 %51, label %52, label %83

52:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #6
  %53 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %11, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !17
  %55 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 4
  %56 = load i32, ptr %9, align 4, !tbaa !13
  %57 = zext i32 %56 to i64
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #6
  %59 = load i32, ptr %58, align 4, !tbaa !13
  %60 = add i32 %54, %59
  %61 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %11, i32 0, i32 2
  %62 = load i8, ptr %61, align 4, !tbaa !19
  %63 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %11, i32 0, i32 3
  %64 = load i8, ptr %63, align 1, !tbaa !20
  %65 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %11, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !21
  %67 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 3
  %68 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %11, i32 0, i32 2
  %69 = load i8, ptr %68, align 4, !tbaa !19
  %70 = call noundef i32 @_ZN3Ani4DofT13GeomTypeToNumEh(i8 noundef zeroext %69)
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %67, i64 noundef %71) #6
  %73 = load i32, ptr %9, align 4, !tbaa !13
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #6
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = add i32 %66, %76
  %78 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %11, i32 0, i32 4
  %79 = load i8, ptr %78, align 2, !tbaa !22
  %80 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %11, i32 0, i32 5
  %81 = load i8, ptr %80, align 1, !tbaa !23
  call void @_ZN3Ani4DofT10LocalOrderC2Ejhhjhh(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef %60, i8 noundef zeroext %62, i8 noundef zeroext %64, i32 noundef %77, i8 noundef zeroext %79, i8 noundef zeroext %81)
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  store i32 1, ptr %10, align 4
  br label %84

83:                                               ; preds = %31
  store i32 0, ptr %10, align 4
  br label %84

84:                                               ; preds = %83, %52
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  %85 = load i32, ptr %10, align 4
  switch i32 %85, label %90 [
    i32 0, label %86
  ]

86:                                               ; preds = %84
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %9, align 4, !tbaa !13
  %89 = add i32 %88, 1
  store i32 %89, ptr %9, align 4, !tbaa !13
  br label %24, !llvm.loop !26

90:                                               ; preds = %84, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  %91 = load i32, ptr %10, align 4
  switch i32 %91, label %187 [
    i32 2, label %92
    i32 1, label %186
  ]

92:                                               ; preds = %90
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load ptr, ptr %20, align 8, !tbaa !15
  %95 = getelementptr inbounds ptr, ptr %94, i64 20
  %96 = load ptr, ptr %95, align 8
  call void %96(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(12) %93)
  br label %186

97:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !13
  br label %98

98:                                               ; preds = %176, %97
  %99 = load i32, ptr %14, align 4, !tbaa !13
  %100 = icmp slt i32 %99, 6
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  store i32 5, ptr %10, align 4
  br label %179

102:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  %103 = load i32, ptr %14, align 4, !tbaa !13
  %104 = call noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef %103)
  store i8 %104, ptr %15, align 1, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %105 = load i8, ptr %15, align 1, !tbaa !25
  %106 = call noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext %105)
  store i32 %106, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #6
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load i32, ptr %16, align 4, !tbaa !13
  %109 = trunc i32 %108 to i8
  %110 = call i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4) %107, i8 noundef zeroext %109)
  store i16 %110, ptr %17, align 1
  %111 = call noundef zeroext i1 @_ZN3Ani4DofT15TetGeomSparsity3Pos7isValidEv(ptr noundef nonnull align 1 dereferenceable(2) %17)
  br i1 %111, label %113, label %112

112:                                              ; preds = %102
  store i32 7, ptr %10, align 4
  br label %173

113:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !13
  br label %114

114:                                              ; preds = %167, %113
  %115 = load i32, ptr %18, align 4, !tbaa !13
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 1
  %118 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %117) #6
  %119 = icmp ult i64 %116, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %114
  store i32 8, ptr %10, align 4
  br label %170

121:                                              ; preds = %114
  %122 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 1
  %123 = load i32, ptr %18, align 4, !tbaa !13
  %124 = zext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %124) #6
  %126 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %125) #6
  %127 = load i8, ptr %15, align 1, !tbaa !25
  %128 = load ptr, ptr %126, align 8, !tbaa !15
  %129 = getelementptr inbounds ptr, ptr %128, i64 11
  %130 = load ptr, ptr %129, align 8
  %131 = call noundef zeroext i1 %130(ptr noundef nonnull align 8 dereferenceable(8) %126, i8 noundef zeroext %127)
  br i1 %131, label %132, label %166

132:                                              ; preds = %121
  %133 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 1
  %134 = load i32, ptr %18, align 4, !tbaa !13
  %135 = zext i32 %134 to i64
  %136 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %135) #6
  %137 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %136) #6
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %141 = trunc i8 %140 to i1
  %142 = load ptr, ptr %137, align 8, !tbaa !15
  %143 = getelementptr inbounds ptr, ptr %142, i64 19
  %144 = load ptr, ptr %143, align 8
  call void %144(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull align 1 dereferenceable(4) %138, ptr noundef nonnull align 4 dereferenceable(12) %139, i1 noundef zeroext %141)
  %145 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 4
  %146 = load i32, ptr %18, align 4, !tbaa !13
  %147 = zext i32 %146 to i64
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %147) #6
  %149 = load i32, ptr %148, align 4, !tbaa !13
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !17
  %153 = add i32 %152, %149
  store i32 %153, ptr %151, align 4, !tbaa !17
  %154 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %20, i32 0, i32 3
  %155 = load i32, ptr %14, align 4, !tbaa !13
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %154, i64 noundef %156) #6
  %158 = load i32, ptr %18, align 4, !tbaa !13
  %159 = zext i32 %158 to i64
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %159) #6
  %161 = load i32, ptr %160, align 4, !tbaa !13
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.Ani::DofT::LocalOrder", ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !21
  %165 = add i32 %164, %161
  store i32 %165, ptr %163, align 4, !tbaa !21
  store i32 1, ptr %10, align 4
  br label %170

166:                                              ; preds = %121
  br label %167

167:                                              ; preds = %166
  %168 = load i32, ptr %18, align 4, !tbaa !13
  %169 = add i32 %168, 1
  store i32 %169, ptr %18, align 4, !tbaa !13
  br label %114, !llvm.loop !28

170:                                              ; preds = %132, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %171 = load i32, ptr %10, align 4
  switch i32 %171, label %173 [
    i32 8, label %172
  ]

172:                                              ; preds = %170
  store i32 0, ptr %10, align 4
  br label %173

173:                                              ; preds = %172, %170, %112
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  %174 = load i32, ptr %10, align 4
  switch i32 %174, label %179 [
    i32 0, label %175
    i32 7, label %176
  ]

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %175, %173
  %177 = load i32, ptr %14, align 4, !tbaa !13
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %14, align 4, !tbaa !13
  br label %98, !llvm.loop !29

179:                                              ; preds = %173, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %180 = load i32, ptr %10, align 4
  switch i32 %180, label %187 [
    i32 5, label %181
    i32 1, label %186
  ]

181:                                              ; preds = %179
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = load ptr, ptr %20, align 8, !tbaa !15
  %184 = getelementptr inbounds ptr, ptr %183, i64 20
  %185 = load ptr, ptr %184, align 8
  call void %185(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(12) %182)
  br label %186

186:                                              ; preds = %181, %179, %92, %90
  ret void

187:                                              ; preds = %179, %90
  unreachable
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!18, !14, i64 0}
!18 = !{!"_ZTSN3Ani4DofT10LocalOrderE", !14, i64 0, !14, i64 4, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11}
!19 = !{!18, !7, i64 8}
!20 = !{!18, !7, i64 9}
!21 = !{!18, !14, i64 4}
!22 = !{!18, !7, i64 10}
!23 = !{!18, !7, i64 11}
!24 = !{i64 0, i64 4, !13, i64 4, i64 4, !13, i64 8, i64 1, !25, i64 9, i64 1, !25, i64 10, i64 1, !25, i64 11, i64 1, !25}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}


; 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::DofT::LocalOrder" = type { i32, i32, i8, i8, i8, i8 }
%"struct.Ani::DofT::TetGeomSparsity::Pos" = type { i8, i8 }

; 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 nounwind uwtable
declare dso_local void @_ZN3Ani4DofT10LocalOrderC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; 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) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4), i8 noundef zeroext) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3Ani4DofT13GeomTypeToNumEh(i8 noundef zeroext) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3Ani4DofT10LocalOrderneERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani4DofT10LocalOrderC2Ejhhjhh(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani4DofT13ComplexDofMap19BeginByGeomSparsityERKNS0_15TetGeomSparsityERNS0_10LocalOrderEb(ptr noundef nonnull align 8 dereferenceable(344) %0, ptr noundef nonnull align 1 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, i1 noundef zeroext %3) unnamed_addr #3 align 2 {
  %5 = alloca %"struct.Ani::DofT::LocalOrder", align 4
  %6 = alloca %"struct.Ani::DofT::LocalOrder", align 4
  %7 = alloca %"struct.Ani::DofT::LocalOrder", align 4
  %8 = alloca %"struct.Ani::DofT::TetGeomSparsity::Pos", align 2
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  br i1 %3, label %.preheader55, label %.preheader56

.preheader56:                                     ; preds = %4
  %10 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not68 = icmp eq i64 %10, 0
  br i1 %.not68, label %._crit_edge, label %.lr.ph

.preheader55:                                     ; preds = %4
  %11 = tail call noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef 0)
  %12 = tail call noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext %11)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #6
  %13 = trunc i32 %12 to i8
  %14 = tail call i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4) %1, i8 noundef zeroext %13)
  store i16 %14, ptr %8, align 2
  %15 = call noundef zeroext i1 @_ZN3Ani4DofT15TetGeomSparsity3Pos7isValidEv(ptr noundef nonnull align 1 dereferenceable(2) %8)
  br i1 %15, label %.preheader, label %.loopexit

.lr.ph:                                           ; preds = %.preheader56, %.critedge
  %16 = phi i64 [ %29, %.critedge ], [ 0, %.preheader56 ]
  %.03762 = phi i32 [ %28, %.critedge ], [ 0, %.preheader56 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  call void @_ZN3Ani4DofT10LocalOrderC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  call void @_ZN3Ani4DofT10LocalOrderC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %16) #6
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 160
  %21 = load ptr, ptr %20, align 8
  call void %21(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %16) #6
  %23 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 152
  %26 = load ptr, ptr %25, align 8
  call void %26(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 1 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(12) %5, i1 noundef zeroext false)
  %27 = call noundef zeroext i1 @_ZNK3Ani4DofT10LocalOrderneERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
  br i1 %27, label %32, label %.critedge

.critedge:                                        ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  %28 = add i32 %.03762, 1
  %29 = zext i32 %28 to i64
  %30 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %31 = icmp ugt i64 %30, %29
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !8

32:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  %33 = load i32, ptr %5, align 4, !tbaa !10
  %34 = getelementptr inbounds i8, ptr %0, i64 320
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %16) #6
  %36 = load i32, ptr %35, align 4, !tbaa !14
  %37 = add i32 %36, %33
  %38 = getelementptr inbounds i8, ptr %5, i64 8
  %39 = load i8, ptr %38, align 4, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %5, i64 9
  %41 = load i8, ptr %40, align 1, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %5, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !17
  %44 = getelementptr inbounds i8, ptr %0, i64 176
  %45 = call noundef i32 @_ZN3Ani4DofT13GeomTypeToNumEh(i8 noundef zeroext %39)
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %44, i64 noundef %46) #6
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %16) #6
  %49 = load i32, ptr %48, align 4, !tbaa !14
  %50 = add i32 %49, %43
  %51 = getelementptr inbounds i8, ptr %5, i64 10
  %52 = load i8, ptr %51, align 2, !tbaa !18
  %53 = getelementptr inbounds i8, ptr %5, i64 11
  %54 = load i8, ptr %53, align 1, !tbaa !19
  call void @_ZN3Ani4DofT10LocalOrderC2Ejhhjhh(ptr noundef nonnull align 4 dereferenceable(12) %7, i32 noundef %37, i8 noundef zeroext %39, i8 noundef zeroext %41, i32 noundef %50, i8 noundef zeroext %52, i8 noundef zeroext %54)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %7, i64 12, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  br label %175

._crit_edge:                                      ; preds = %.critedge, %.preheader56
  %55 = load ptr, ptr %0, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 160
  %57 = load ptr, ptr %56, align 8
  call void %57(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br label %175

.preheader:                                       ; preds = %.preheader55
  %58 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not63.not = icmp eq i64 %58, 0
  br i1 %.not63.not, label %.loopexit, label %.lr.ph65

59:                                               ; preds = %.lr.ph65
  %60 = add i32 %.064, 1
  %61 = zext i32 %60 to i64
  %62 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not = icmp ugt i64 %62, %61
  br i1 %.not, label %.lr.ph65, label %.loopexit, !llvm.loop !22

.lr.ph65:                                         ; preds = %.preheader, %59
  %63 = phi i64 [ %61, %59 ], [ 0, %.preheader ]
  %.064 = phi i32 [ %60, %59 ], [ 0, %.preheader ]
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %63) #6
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %64) #6
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i64 88
  %68 = load ptr, ptr %67, align 8
  %69 = call noundef zeroext i1 %68(ptr noundef nonnull align 8 dereferenceable(8) %65, i8 noundef zeroext %11)
  br i1 %69, label %.loopexit73, label %59

.loopexit:                                        ; preds = %59, %.preheader, %.preheader55
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #6
  %70 = call noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef 1)
  %71 = call noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext %70)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #6
  %72 = trunc i32 %71 to i8
  %73 = call i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4) %1, i8 noundef zeroext %72)
  store i16 %73, ptr %8, align 2
  %74 = call noundef zeroext i1 @_ZN3Ani4DofT15TetGeomSparsity3Pos7isValidEv(ptr noundef nonnull align 1 dereferenceable(2) %8)
  br i1 %74, label %.preheader.1, label %.loopexit.1

.preheader.1:                                     ; preds = %.loopexit
  %75 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not63.not.1 = icmp eq i64 %75, 0
  br i1 %.not63.not.1, label %.loopexit.1, label %.lr.ph65.1

.lr.ph65.1:                                       ; preds = %.preheader.1, %83
  %76 = phi i64 [ %85, %83 ], [ 0, %.preheader.1 ]
  %.064.1 = phi i32 [ %84, %83 ], [ 0, %.preheader.1 ]
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %76) #6
  %78 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %77) #6
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 88
  %81 = load ptr, ptr %80, align 8
  %82 = call noundef zeroext i1 %81(ptr noundef nonnull align 8 dereferenceable(8) %78, i8 noundef zeroext %70)
  br i1 %82, label %.loopexit73, label %83

83:                                               ; preds = %.lr.ph65.1
  %84 = add i32 %.064.1, 1
  %85 = zext i32 %84 to i64
  %86 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not.1 = icmp ugt i64 %86, %85
  br i1 %.not.1, label %.lr.ph65.1, label %.loopexit.1, !llvm.loop !22

.loopexit.1:                                      ; preds = %83, %.preheader.1, %.loopexit
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #6
  %87 = call noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef 2)
  %88 = call noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext %87)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #6
  %89 = trunc i32 %88 to i8
  %90 = call i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4) %1, i8 noundef zeroext %89)
  store i16 %90, ptr %8, align 2
  %91 = call noundef zeroext i1 @_ZN3Ani4DofT15TetGeomSparsity3Pos7isValidEv(ptr noundef nonnull align 1 dereferenceable(2) %8)
  br i1 %91, label %.preheader.2, label %.loopexit.2

.preheader.2:                                     ; preds = %.loopexit.1
  %92 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not63.not.2 = icmp eq i64 %92, 0
  br i1 %.not63.not.2, label %.loopexit.2, label %.lr.ph65.2

.lr.ph65.2:                                       ; preds = %.preheader.2, %100
  %93 = phi i64 [ %102, %100 ], [ 0, %.preheader.2 ]
  %.064.2 = phi i32 [ %101, %100 ], [ 0, %.preheader.2 ]
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %93) #6
  %95 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %94) #6
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i64 88
  %98 = load ptr, ptr %97, align 8
  %99 = call noundef zeroext i1 %98(ptr noundef nonnull align 8 dereferenceable(8) %95, i8 noundef zeroext %87)
  br i1 %99, label %.loopexit73, label %100

100:                                              ; preds = %.lr.ph65.2
  %101 = add i32 %.064.2, 1
  %102 = zext i32 %101 to i64
  %103 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not.2 = icmp ugt i64 %103, %102
  br i1 %.not.2, label %.lr.ph65.2, label %.loopexit.2, !llvm.loop !22

.loopexit.2:                                      ; preds = %100, %.preheader.2, %.loopexit.1
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #6
  %104 = call noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef 3)
  %105 = call noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext %104)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #6
  %106 = trunc i32 %105 to i8
  %107 = call i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4) %1, i8 noundef zeroext %106)
  store i16 %107, ptr %8, align 2
  %108 = call noundef zeroext i1 @_ZN3Ani4DofT15TetGeomSparsity3Pos7isValidEv(ptr noundef nonnull align 1 dereferenceable(2) %8)
  br i1 %108, label %.preheader.3, label %.loopexit.3

.preheader.3:                                     ; preds = %.loopexit.2
  %109 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not63.not.3 = icmp eq i64 %109, 0
  br i1 %.not63.not.3, label %.loopexit.3, label %.lr.ph65.3

.lr.ph65.3:                                       ; preds = %.preheader.3, %117
  %110 = phi i64 [ %119, %117 ], [ 0, %.preheader.3 ]
  %.064.3 = phi i32 [ %118, %117 ], [ 0, %.preheader.3 ]
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %110) #6
  %112 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %111) #6
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = getelementptr inbounds i8, ptr %113, i64 88
  %115 = load ptr, ptr %114, align 8
  %116 = call noundef zeroext i1 %115(ptr noundef nonnull align 8 dereferenceable(8) %112, i8 noundef zeroext %104)
  br i1 %116, label %.loopexit73, label %117

117:                                              ; preds = %.lr.ph65.3
  %118 = add i32 %.064.3, 1
  %119 = zext i32 %118 to i64
  %120 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not.3 = icmp ugt i64 %120, %119
  br i1 %.not.3, label %.lr.ph65.3, label %.loopexit.3, !llvm.loop !22

.loopexit.3:                                      ; preds = %117, %.preheader.3, %.loopexit.2
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #6
  %121 = call noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef 4)
  %122 = call noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext %121)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #6
  %123 = trunc i32 %122 to i8
  %124 = call i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4) %1, i8 noundef zeroext %123)
  store i16 %124, ptr %8, align 2
  %125 = call noundef zeroext i1 @_ZN3Ani4DofT15TetGeomSparsity3Pos7isValidEv(ptr noundef nonnull align 1 dereferenceable(2) %8)
  br i1 %125, label %.preheader.4, label %.loopexit.4

.preheader.4:                                     ; preds = %.loopexit.3
  %126 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not63.not.4 = icmp eq i64 %126, 0
  br i1 %.not63.not.4, label %.loopexit.4, label %.lr.ph65.4

.lr.ph65.4:                                       ; preds = %.preheader.4, %134
  %127 = phi i64 [ %136, %134 ], [ 0, %.preheader.4 ]
  %.064.4 = phi i32 [ %135, %134 ], [ 0, %.preheader.4 ]
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %127) #6
  %129 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %128) #6
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 88
  %132 = load ptr, ptr %131, align 8
  %133 = call noundef zeroext i1 %132(ptr noundef nonnull align 8 dereferenceable(8) %129, i8 noundef zeroext %121)
  br i1 %133, label %.loopexit73, label %134

134:                                              ; preds = %.lr.ph65.4
  %135 = add i32 %.064.4, 1
  %136 = zext i32 %135 to i64
  %137 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not.4 = icmp ugt i64 %137, %136
  br i1 %.not.4, label %.lr.ph65.4, label %.loopexit.4, !llvm.loop !22

.loopexit.4:                                      ; preds = %134, %.preheader.4, %.loopexit.3
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #6
  %138 = call noundef zeroext i8 @_ZN3Ani4DofT13NumToGeomTypeEi(i32 noundef 5)
  %139 = call noundef i32 @_ZN3Ani4DofT11GeomTypeDimEh(i8 noundef zeroext %138)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #6
  %140 = trunc i32 %139 to i8
  %141 = call i16 @_ZNK3Ani4DofT15TetGeomSparsity8beginPosEh(ptr noundef nonnull align 1 dereferenceable(4) %1, i8 noundef zeroext %140)
  store i16 %141, ptr %8, align 2
  %142 = call noundef zeroext i1 @_ZN3Ani4DofT15TetGeomSparsity3Pos7isValidEv(ptr noundef nonnull align 1 dereferenceable(2) %8)
  br i1 %142, label %.preheader.5, label %.loopexit.5

.preheader.5:                                     ; preds = %.loopexit.4
  %143 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not63.not.5 = icmp eq i64 %143, 0
  br i1 %.not63.not.5, label %.loopexit.5, label %.lr.ph65.5

.lr.ph65.5:                                       ; preds = %.preheader.5, %151
  %144 = phi i64 [ %153, %151 ], [ 0, %.preheader.5 ]
  %.064.5 = phi i32 [ %152, %151 ], [ 0, %.preheader.5 ]
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %144) #6
  %146 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %145) #6
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = getelementptr inbounds i8, ptr %147, i64 88
  %149 = load ptr, ptr %148, align 8
  %150 = call noundef zeroext i1 %149(ptr noundef nonnull align 8 dereferenceable(8) %146, i8 noundef zeroext %138)
  br i1 %150, label %.loopexit73, label %151

151:                                              ; preds = %.lr.ph65.5
  %152 = add i32 %.064.5, 1
  %153 = zext i32 %152 to i64
  %154 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %.not.5 = icmp ugt i64 %154, %153
  br i1 %.not.5, label %.lr.ph65.5, label %.loopexit.5, !llvm.loop !22

.loopexit.5:                                      ; preds = %151, %.preheader.5, %.loopexit.4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #6
  %155 = load ptr, ptr %0, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i64 160
  %157 = load ptr, ptr %156, align 8
  call void %157(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br label %175

.loopexit73:                                      ; preds = %.lr.ph65, %.lr.ph65.1, %.lr.ph65.2, %.lr.ph65.3, %.lr.ph65.4, %.lr.ph65.5
  %.03966.lcssa = phi i64 [ 5, %.lr.ph65.5 ], [ 4, %.lr.ph65.4 ], [ 3, %.lr.ph65.3 ], [ 2, %.lr.ph65.2 ], [ 1, %.lr.ph65.1 ], [ 0, %.lr.ph65 ]
  %.lcssa = phi i64 [ %144, %.lr.ph65.5 ], [ %127, %.lr.ph65.4 ], [ %110, %.lr.ph65.3 ], [ %93, %.lr.ph65.2 ], [ %76, %.lr.ph65.1 ], [ %63, %.lr.ph65 ]
  %158 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.lcssa) #6
  %159 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %158) #6
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = getelementptr inbounds i8, ptr %160, i64 152
  %162 = load ptr, ptr %161, align 8
  call void %162(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef nonnull align 1 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, i1 noundef zeroext true)
  %163 = getelementptr inbounds i8, ptr %0, i64 320
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %.lcssa) #6
  %165 = load i32, ptr %164, align 4, !tbaa !14
  %166 = load i32, ptr %2, align 4, !tbaa !10
  %167 = add i32 %166, %165
  store i32 %167, ptr %2, align 4, !tbaa !10
  %168 = getelementptr inbounds i8, ptr %0, i64 176
  %169 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %168, i64 noundef %.03966.lcssa) #6
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %169, i64 noundef %.lcssa) #6
  %171 = load i32, ptr %170, align 4, !tbaa !14
  %172 = getelementptr inbounds i8, ptr %2, i64 4
  %173 = load i32, ptr %172, align 4, !tbaa !17
  %174 = add i32 %173, %171
  store i32 %174, ptr %172, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #6
  br label %175

175:                                              ; preds = %.loopexit73, %32, %.loopexit.5, %._crit_edge
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTSN3Ani4DofT10LocalOrderE", !12, i64 0, !12, i64 4, !13, i64 8, !13, i64 9, !13, i64 10, !13, i64 11}
!12 = !{!"int", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!11, !13, i64 8}
!16 = !{!11, !13, i64 9}
!17 = !{!11, !12, i64 4}
!18 = !{!11, !13, i64 10}
!19 = !{!11, !13, i64 11}
!20 = !{i64 0, i64 4, !14, i64 4, i64 4, !14, i64 8, i64 1, !21, i64 9, i64 1, !21, i64 10, i64 1, !21, i64 11, i64 1, !21}
!21 = !{!13, !13, i64 0}
!22 = distinct !{!22, !9}


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