; 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::PlainMemoryX" = type { ptr, ptr, ptr, i64, i64, i64 }
%"struct.Ani::DofT::ComponentTetOrder" = type { %"struct.Ani::DofT::TetOrder", %"struct.Ani::DofT::TetOrder", i32 }
%"struct.Ani::DofT::TetOrder" = type { i32 }
%"struct.Ani::ArrayView" = type { ptr, i64 }
%"struct.Ani::BaseFemSpace" = type { ptr, %"struct.Ani::DofT::DofMap" }
%"struct.Ani::DofT::DofMap" = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.Ani::UnionFemSpace" = type { %"struct.Ani::BaseFemSpace", %"class.std::vector.31", %"class.std::vector.55" }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.55" = type { %"struct.std::_Vector_base.56" }
%"struct.std::_Vector_base.56" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [101 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3Ani13UnionFemSpace16interpolateOnDOFERKNS_5TetraIKdEERKPFiRKSt5arrayIdLm3EEPdjPvEPNS_9ArrayViewIdEEiiNS_12PlainMemoryXIdiEESB_j = external hidden unnamed_addr constant [158 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Ani12PlainMemoryXIdiE2geIdiEEbRKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3Ani4DofT8TetOrdercvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

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

declare { i64, i32 } @_ZNK3Ani4DofT13ComplexDofMap11ComponentIDENS0_8TetOrderE(ptr noundef nonnull align 8 dereferenceable(344), i32) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani13UnionFemSpace16interpolateOnDOFERKNS_5TetraIKdEERKPFiRKSt5arrayIdLm3EEPdjPvEPNS_9ArrayViewIdEEiiNS_12PlainMemoryXIdiEESB_j(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(132) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef byval(%"struct.Ani::PlainMemoryX") align 8 %6, ptr noundef %7, i32 noundef %8) unnamed_addr #5 align 2 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.Ani::PlainMemoryX", align 8
  %19 = alloca %"struct.Ani::DofT::ComponentTetOrder", align 4
  %20 = alloca %"struct.Ani::DofT::TetOrder", align 4
  %21 = alloca { i64, i32 }, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"struct.Ani::ArrayView", align 8
  %27 = alloca %"struct.Ani::PlainMemoryX", align 8
  %28 = alloca i32, align 4
  %29 = alloca %"struct.Ani::ArrayView", align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i32 %4, ptr %14, align 4, !tbaa !9
  store i32 %5, ptr %15, align 4, !tbaa !9
  store ptr %7, ptr %16, align 8, !tbaa !5
  store i32 %8, ptr %17, align 4, !tbaa !9
  %30 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #6
  %31 = load i32, ptr %14, align 4, !tbaa !9
  %32 = load i32, ptr %15, align 4, !tbaa !9
  %33 = load i32, ptr %17, align 4, !tbaa !9
  %34 = load ptr, ptr %30, align 8, !tbaa !11
  %35 = getelementptr inbounds ptr, ptr %34, i64 7
  %36 = load ptr, ptr %35, align 8
  call void %36(ptr dead_on_unwind writable sret(%"struct.Ani::PlainMemoryX") align 8 %18, ptr noundef nonnull align 8 dereferenceable(72) %30, i32 noundef %31, i32 noundef %32, i32 noundef %33)
  %37 = call noundef zeroext i1 @_ZNK3Ani12PlainMemoryXIdiE2geIdiEEbRKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %18)
  br i1 %37, label %38, label %39

38:                                               ; preds = %9
  br label %39

39:                                               ; preds = %38, %9
  %40 = phi i1 [ false, %9 ], [ true, %38 ]
  br i1 %40, label %41, label %42

41:                                               ; preds = %39
  br label %44

42:                                               ; preds = %39
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.3, i32 noundef 935, ptr noundef @__PRETTY_FUNCTION__._ZNK3Ani13UnionFemSpace16interpolateOnDOFERKNS_5TetraIKdEERKPFiRKSt5arrayIdLm3EEPdjPvEPNS_9ArrayViewIdEEiiNS_12PlainMemoryXIdiEESB_j) #7
  unreachable

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %41
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  %45 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %30, i32 0, i32 1
  %46 = call noundef ptr @_ZNK3Ani4DofT6DofMap6targetINS0_13ComplexDofMapEEEPKT_v(ptr noundef nonnull align 8 dereferenceable(16) %45)
  %47 = load i32, ptr %14, align 4, !tbaa !9
  call void @_ZN3Ani4DofT8TetOrderC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef %47)
  %48 = getelementptr inbounds %"struct.Ani::DofT::TetOrder", ptr %20, i32 0, i32 0
  %49 = load i32, ptr %48, align 4
  %50 = call { i64, i32 } @_ZNK3Ani4DofT13ComplexDofMap11ComponentIDENS0_8TetOrderE(ptr noundef nonnull align 8 dereferenceable(344) %46, i32 %49)
  store { i64, i32 } %50, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %21, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %51 = getelementptr inbounds %"struct.Ani::DofT::ComponentTetOrder", ptr %19, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !13
  store i32 %52, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %53 = getelementptr inbounds %"struct.Ani::DofT::ComponentTetOrder", ptr %19, i32 0, i32 1
  %54 = call noundef i32 @_ZNK3Ani4DofT8TetOrdercvjEv(ptr noundef nonnull align 4 dereferenceable(4) %53)
  store i32 %54, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = getelementptr inbounds %"struct.Ani::DofT::ComponentTetOrder", ptr %19, i32 0, i32 1
  %57 = call noundef i32 @_ZNK3Ani4DofT8TetOrdercvjEv(ptr noundef nonnull align 4 dereferenceable(4) %56)
  %58 = sub i32 %55, %57
  store i32 %58, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %87, %44
  %60 = load i32, ptr %25, align 4, !tbaa !9
  %61 = load i32, ptr %15, align 4, !tbaa !9
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %90

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #6
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = load i32, ptr %25, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %65, i64 %67
  %69 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = load i32, ptr %24, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds double, ptr %70, i64 %72
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = load i32, ptr %25, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %74, i64 %76
  %78 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %77, i32 0, i32 1
  %79 = load i64, ptr %78, align 8, !tbaa !19
  %80 = load i32, ptr %24, align 4, !tbaa !9
  %81 = zext i32 %80 to i64
  %82 = sub i64 %79, %81
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef %73, i64 noundef %82)
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = load i32, ptr %25, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %83, i64 %85
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %86, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  br label %87

87:                                               ; preds = %64
  %88 = load i32, ptr %25, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %25, align 4, !tbaa !9
  br label %59, !llvm.loop !22

90:                                               ; preds = %63
  %91 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %30, i32 0, i32 1
  %92 = load i32, ptr %22, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %93) #6
  %95 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %94) #6
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = load i32, ptr %23, align 4, !tbaa !9
  %100 = load i32, ptr %15, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %6, i64 48, i1 false), !tbaa.struct !24
  %101 = load ptr, ptr %16, align 8, !tbaa !5
  %102 = load i32, ptr %17, align 4, !tbaa !9
  %103 = load ptr, ptr %95, align 8, !tbaa !11
  %104 = getelementptr inbounds ptr, ptr %103, i64 6
  %105 = load ptr, ptr %104, align 8
  call void %105(ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(132) %96, ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef %98, i32 noundef %99, i32 noundef %100, ptr noundef byval(%"struct.Ani::PlainMemoryX") align 8 %27, ptr noundef %101, i32 noundef %102)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %135, %90
  %107 = load i32, ptr %28, align 4, !tbaa !9
  %108 = load i32, ptr %15, align 4, !tbaa !9
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %138

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #6
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = load i32, ptr %28, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %112, i64 %114
  %116 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !16
  %118 = load i32, ptr %24, align 4, !tbaa !9
  %119 = zext i32 %118 to i64
  %120 = sub i64 0, %119
  %121 = getelementptr inbounds double, ptr %117, i64 %120
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = load i32, ptr %28, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %122, i64 %124
  %126 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %125, i32 0, i32 1
  %127 = load i64, ptr %126, align 8, !tbaa !19
  %128 = load i32, ptr %24, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = add i64 %127, %129
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef %121, i64 noundef %130)
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = load i32, ptr %28, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %131, i64 %133
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %134, ptr align 8 %29, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  br label %135

135:                                              ; preds = %111
  %136 = load i32, ptr %28, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %28, align 4, !tbaa !9
  br label %106, !llvm.loop !25

138:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  ret void
}

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

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

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


; 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::PlainMemoryX" = type { ptr, ptr, ptr, i64, i64, i64 }
%"struct.Ani::DofT::ComponentTetOrder" = type { %"struct.Ani::DofT::TetOrder", %"struct.Ani::DofT::TetOrder", i32 }
%"struct.Ani::DofT::TetOrder" = type { i32 }
%"struct.Ani::ArrayView" = type { ptr, i64 }

@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [101 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3Ani13UnionFemSpace16interpolateOnDOFERKNS_5TetraIKdEERKPFiRKSt5arrayIdLm3EEPdjPvEPNS_9ArrayViewIdEEiiNS_12PlainMemoryXIdiEESB_j = external hidden unnamed_addr constant [158 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

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Ani12PlainMemoryXIdiE2geIdiEEbRKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

declare { i64, i32 } @_ZNK3Ani4DofT13ComplexDofMap11ComponentIDENS0_8TetOrderE(ptr noundef nonnull align 8 dereferenceable(344), i32) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Ani13UnionFemSpace16interpolateOnDOFERKNS_5TetraIKdEERKPFiRKSt5arrayIdLm3EEPdjPvEPNS_9ArrayViewIdEEiiNS_12PlainMemoryXIdiEESB_j(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(132) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef byval(%"struct.Ani::PlainMemoryX") align 8 %6, ptr noundef %7, i32 noundef %8) unnamed_addr #5 align 2 {
  %10 = alloca %"struct.Ani::PlainMemoryX", align 8
  %11 = alloca %"struct.Ani::DofT::ComponentTetOrder", align 8
  %12 = alloca %"struct.Ani::DofT::TetOrder", align 4
  %13 = alloca %"struct.Ani::ArrayView", align 8
  %14 = alloca %"struct.Ani::ArrayView", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #6
  %15 = load ptr, ptr %0, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 56
  %17 = load ptr, ptr %16, align 8
  call void %17(ptr dead_on_unwind nonnull writable sret(%"struct.Ani::PlainMemoryX") align 8 %10, ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %4, i32 noundef %5, i32 noundef %8)
  %18 = call noundef zeroext i1 @_ZNK3Ani12PlainMemoryXIdiE2geIdiEEbRKNS0_IT_T0_EE(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %10)
  br i1 %18, label %20, label %19

19:                                               ; preds = %9
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.3, i32 noundef 935, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3Ani13UnionFemSpace16interpolateOnDOFERKNS_5TetraIKdEERKPFiRKSt5arrayIdLm3EEPdjPvEPNS_9ArrayViewIdEEiiNS_12PlainMemoryXIdiEESB_j) #7
  unreachable

20:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #6
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = call noundef ptr @_ZNK3Ani4DofT6DofMap6targetINS0_13ComplexDofMapEEEPKT_v(ptr noundef nonnull align 8 dereferenceable(16) %21)
  call void @_ZN3Ani4DofT8TetOrderC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 noundef %4)
  %23 = load i32, ptr %12, align 4
  %24 = call { i64, i32 } @_ZNK3Ani4DofT13ComplexDofMap11ComponentIDENS0_8TetOrderE(ptr noundef nonnull align 8 dereferenceable(344) %22, i32 %23)
  %.fca.0.extract = extractvalue { i64, i32 } %24, 0
  %.fca.1.extract = extractvalue { i64, i32 } %24, 1
  store i64 %.fca.0.extract, ptr %11, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %25 = getelementptr inbounds i8, ptr %11, i64 4
  %26 = call noundef i32 @_ZNK3Ani4DofT8TetOrdercvjEv(ptr noundef nonnull align 4 dereferenceable(4) %25)
  %27 = call noundef i32 @_ZNK3Ani4DofT8TetOrdercvjEv(ptr noundef nonnull align 4 dereferenceable(4) %25)
  %28 = sub i32 %4, %27
  %29 = icmp sgt i32 %5, 0
  br i1 %29, label %.lr.ph, label %._crit_edge41.critedge

.lr.ph:                                           ; preds = %20
  %30 = zext i32 %28 to i64
  %wide.trip.count = zext nneg i32 %5 to i64
  br label %40

._crit_edge:                                      ; preds = %40
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = zext i32 %.fca.1.extract to i64
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %32) #6
  %34 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %33) #6
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 48
  %37 = load ptr, ptr %36, align 8
  call void %37(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(132) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %3, i32 noundef %26, i32 noundef %5, ptr noundef nonnull byval(%"struct.Ani::PlainMemoryX") align 8 %6, ptr noundef %7, i32 noundef %8)
  br i1 %29, label %.lr.ph40, label %._crit_edge41

.lr.ph40:                                         ; preds = %._crit_edge
  %38 = zext i32 %28 to i64
  %39 = sub nsw i64 0, %38
  %wide.trip.count46 = zext nneg i32 %5 to i64
  br label %54

40:                                               ; preds = %.lr.ph, %40
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %40 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %41 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %3, i64 %indvars.iv
  %42 = load ptr, ptr %41, align 8, !tbaa !8
  %43 = getelementptr inbounds double, ptr %42, i64 %30
  %44 = getelementptr inbounds i8, ptr %41, i64 8
  %45 = load i64, ptr %44, align 8, !tbaa !13
  %46 = sub i64 %45, %30
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef %43, i64 noundef %46)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  %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_edge, label %40, !llvm.loop !17

._crit_edge41.critedge:                           ; preds = %20
  %47 = getelementptr inbounds i8, ptr %0, i64 24
  %48 = zext i32 %.fca.1.extract to i64
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %48) #6
  %50 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %49) #6
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 48
  %53 = load ptr, ptr %52, align 8
  call void %53(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(132) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %3, i32 noundef %26, i32 noundef %5, ptr noundef nonnull byval(%"struct.Ani::PlainMemoryX") align 8 %6, ptr noundef %7, i32 noundef %8)
  br label %._crit_edge41

._crit_edge41:                                    ; preds = %54, %._crit_edge41.critedge, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #6
  ret void

54:                                               ; preds = %.lr.ph40, %54
  %indvars.iv43 = phi i64 [ 0, %.lr.ph40 ], [ %indvars.iv.next44, %54 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  %55 = getelementptr inbounds %"struct.Ani::ArrayView", ptr %3, i64 %indvars.iv43
  %56 = load ptr, ptr %55, align 8, !tbaa !8
  %57 = getelementptr inbounds double, ptr %56, i64 %39
  %58 = getelementptr inbounds i8, ptr %55, i64 8
  %59 = load i64, ptr %58, align 8, !tbaa !13
  %60 = add i64 %59, %38
  call void @_ZN3Ani9ArrayViewIdEC2EPdm(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %57, i64 noundef %60)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(16) %14, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond47.not = icmp eq i64 %indvars.iv.next44, %wide.trip.count46
  br i1 %exitcond47.not, label %._crit_edge41, label %54, !llvm.loop !19
}

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass