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

; 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.std::pair.4" = type <{ i32, %"struct.Ani::DofT::LocSymOrder", [2 x i8] }>
%"struct.Ani::DofT::LocSymOrder" = type { i8, i8 }
%"struct.Ani::DofT::LocGeomOrder" = type <{ i32, i8, i8, [2 x 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 }

@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3Ani4DofT13ComplexDofMap11TetDofIDExtENS0_12LocGeomOrderE = external hidden unnamed_addr constant [101 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11upper_boundIPKjjET_S2_S2_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3Ani4DofT10BaseDofMap12isValidIndexENS0_12LocGeomOrderE(ptr noundef nonnull align 8 dereferenceable(8), i64) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIjN3Ani4DofT11LocSymOrderEEC2IjRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_(ptr noundef nonnull align 4 dereferenceable(6), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(2)) unnamed_addr #5 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) #5 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) #5 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) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZNK3Ani4DofT13ComplexDofMap11TetDofIDExtENS0_12LocGeomOrderE(ptr noundef nonnull align 8 dereferenceable(344) %0, i64 %1) unnamed_addr #6 align 2 {
  %3 = alloca %"struct.std::pair.4", align 4
  %4 = alloca %"struct.Ani::DofT::LocGeomOrder", align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.Ani::DofT::LocGeomOrder", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair.4", align 4
  %10 = alloca %"struct.Ani::DofT::LocGeomOrder", align 4
  %11 = alloca i32, align 4
  store i64 %1, ptr %4, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !9
  %13 = load i64, ptr %6, align 4
  %14 = call noundef zeroext i1 @_ZNK3Ani4DofT10BaseDofMap12isValidIndexENS0_12LocGeomOrderE(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 %13)
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  br label %16

16:                                               ; preds = %15, %2
  %17 = phi i1 [ false, %2 ], [ true, %15 ]
  br i1 %17, label %18, label %19

18:                                               ; preds = %16
  br label %21

19:                                               ; preds = %16
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.3, i32 noundef 663, ptr noundef @__PRETTY_FUNCTION__._ZNK3Ani4DofT13ComplexDofMap11TetDofIDExtENS0_12LocGeomOrderE) #7
  unreachable

20:                                               ; No predecessors!
  br label %21

21:                                               ; preds = %20, %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %22 = getelementptr inbounds %"struct.Ani::DofT::LocGeomOrder", ptr %4, i32 0, i32 1
  %23 = load i8, ptr %22, align 4, !tbaa !13
  %24 = call noundef i32 @_ZN3Ani4DofT13GeomTypeToNumEh(i8 noundef zeroext %23)
  store i32 %24, ptr %7, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %25 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %12, i32 0, i32 3
  %26 = load i32, ptr %7, align 4, !tbaa !10
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %25, i64 noundef %27) #8
  %29 = call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  %30 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %12, i32 0, i32 3
  %31 = load i32, ptr %7, align 4, !tbaa !10
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %30, i64 noundef %32) #8
  %34 = call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #8
  %35 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %12, i32 0, i32 3
  %36 = load i32, ptr %7, align 4, !tbaa !10
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %35, i64 noundef %37) #8
  %39 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #8
  %40 = getelementptr inbounds i32, ptr %34, i64 %39
  %41 = getelementptr inbounds %"struct.Ani::DofT::LocGeomOrder", ptr %4, i32 0, i32 0
  %42 = call noundef ptr @_ZSt11upper_boundIPKjjET_S2_S2_RKT0_(ptr noundef %29, ptr noundef %40, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %43 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %12, i32 0, i32 3
  %44 = load i32, ptr %7, align 4, !tbaa !10
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %43, i64 noundef %45) #8
  %47 = call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  %48 = ptrtoint ptr %42 to i64
  %49 = ptrtoint ptr %47 to i64
  %50 = sub i64 %48, %49
  %51 = sdiv exact i64 %50, 4
  %52 = sub nsw i64 %51, 1
  %53 = trunc i64 %52 to i32
  store i32 %53, ptr %8, align 4, !tbaa !10
  %54 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %12, i32 0, i32 3
  %55 = load i32, ptr %7, align 4, !tbaa !10
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %54, i64 noundef %56) #8
  %58 = load i32, ptr %8, align 4, !tbaa !10
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #8
  %61 = load i32, ptr %60, align 4, !tbaa !10
  %62 = getelementptr inbounds %"struct.Ani::DofT::LocGeomOrder", ptr %4, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = sub i32 %63, %61
  store i32 %64, ptr %62, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %65 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %12, i32 0, i32 1
  %66 = load i32, ptr %8, align 4, !tbaa !10
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %67) #8
  %69 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %68) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !9
  %70 = load i64, ptr %10, align 4
  %71 = load ptr, ptr %69, align 8, !tbaa !16
  %72 = getelementptr inbounds ptr, ptr %71, i64 10
  %73 = load ptr, ptr %72, align 8
  %74 = call i64 %73(ptr noundef nonnull align 8 dereferenceable(8) %69, i64 %70)
  %75 = trunc i64 %74 to i48
  store i48 %75, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %76 = getelementptr inbounds %"struct.Ani::DofT::ComplexDofMap", ptr %12, i32 0, i32 4
  %77 = load i32, ptr %8, align 4, !tbaa !10
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #8
  %80 = load i32, ptr %79, align 4, !tbaa !10
  %81 = getelementptr inbounds %"struct.std::pair.4", ptr %9, i32 0, i32 0
  %82 = load i32, ptr %81, align 4, !tbaa !18
  %83 = add i32 %80, %82
  store i32 %83, ptr %11, align 4, !tbaa !10
  %84 = getelementptr inbounds %"struct.std::pair.4", ptr %9, i32 0, i32 1
  call void @_ZNSt4pairIjN3Ani4DofT11LocSymOrderEEC2IjRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_(ptr noundef nonnull align 4 dereferenceable(6) %3, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(2) %84)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  %85 = load i64, ptr %3, align 4
  ret i64 %85
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #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 = { noreturn nounwind }
attributes #8 = { 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 = !{i64 0, i64 4, !10, i64 4, i64 1, !12, i64 5, i64 1, !12}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !7, i64 4}
!14 = !{!"_ZTSN3Ani4DofT12LocGeomOrderE", !11, i64 0, !7, i64 4, !7, i64 5}
!15 = !{!14, !11, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!19, !11, i64 0}
!19 = !{!"_ZTSSt4pairIjN3Ani4DofT11LocSymOrderEE", !11, i64 0, !20, i64 4}
!20 = !{!"_ZTSN3Ani4DofT11LocSymOrderE", !7, i64 0, !7, i64 1}


; 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.std::pair.4" = type <{ i32, %"struct.Ani::DofT::LocSymOrder", [2 x i8] }>
%"struct.Ani::DofT::LocSymOrder" = type { i8, i8 }
%"struct.Ani::DofT::LocGeomOrder" = type <{ i32, i8, i8, [2 x i8] }>

@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [38 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3Ani4DofT13ComplexDofMap11TetDofIDExtENS0_12LocGeomOrderE = external hidden unnamed_addr constant [101 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11upper_boundIPKjjET_S2_S2_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3Ani4DofT10BaseDofMap12isValidIndexENS0_12LocGeomOrderE(ptr noundef nonnull align 8 dereferenceable(8), i64) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIjN3Ani4DofT11LocSymOrderEEC2IjRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_(ptr noundef nonnull align 4 dereferenceable(6), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(2)) unnamed_addr #4 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 #4 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 #4 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 #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZNK3Ani4DofT13ComplexDofMap11TetDofIDExtENS0_12LocGeomOrderE(ptr noundef nonnull align 8 dereferenceable(344) %0, i64 %1) unnamed_addr #5 align 2 {
  %3 = alloca %"struct.std::pair.4", align 8
  %4 = alloca %"struct.Ani::DofT::LocGeomOrder", align 8
  %5 = alloca %"struct.std::pair.4", align 8
  %6 = alloca i32, align 4
  store i64 %1, ptr %4, align 8
  %7 = tail call noundef zeroext i1 @_ZNK3Ani4DofT10BaseDofMap12isValidIndexENS0_12LocGeomOrderE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 %1)
  br i1 %7, label %9, label %8

8:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.3, i32 noundef 663, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3Ani4DofT13ComplexDofMap11TetDofIDExtENS0_12LocGeomOrderE) #6
  unreachable

9:                                                ; preds = %2
  %10 = lshr i64 %1, 32
  %11 = trunc i64 %10 to i8
  %12 = tail call noundef i32 @_ZN3Ani4DofT13GeomTypeToNumEh(i8 noundef zeroext %11)
  %13 = getelementptr inbounds i8, ptr %0, i64 176
  %14 = sext i32 %12 to i64
  %15 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %13, i64 noundef %14) #7
  %16 = tail call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  %17 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %13, i64 noundef %14) #7
  %18 = tail call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  %19 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %13, i64 noundef %14) #7
  %20 = tail call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %21 = getelementptr inbounds i32, ptr %18, i64 %20
  %22 = call noundef ptr @_ZSt11upper_boundIPKjjET_S2_S2_RKT0_(ptr noundef %16, ptr noundef %21, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %13, i64 noundef %14) #7
  %24 = call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  %25 = ptrtoint ptr %22 to i64
  %26 = ptrtoint ptr %24 to i64
  %27 = sub i64 %25, %26
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt5arrayISt6vectorIjSaIjEELm6EEixEm(ptr noundef nonnull align 8 dereferenceable(144) %13, i64 noundef %14) #7
  %29 = shl i64 %27, 30
  %sext = add i64 %29, -4294967296
  %30 = ashr i64 %sext, 32
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %30) #7
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 8, !tbaa !9
  %34 = sub i32 %33, %32
  store i32 %34, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %30) #7
  %37 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %36) #7
  %.sroa.0.0.copyload = load i64, ptr %4, align 8
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds i8, ptr %38, i64 80
  %40 = load ptr, ptr %39, align 8
  %41 = call i64 %40(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 %.sroa.0.0.copyload)
  %42 = trunc i64 %41 to i48
  store i48 %42, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %43 = getelementptr inbounds i8, ptr %0, i64 320
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %30) #7
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = trunc i64 %41 to i32
  %47 = add i32 %45, %46
  store i32 %47, ptr %6, align 4, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %5, i64 4
  call void @_ZNSt4pairIjN3Ani4DofT11LocSymOrderEEC2IjRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_(ptr noundef nonnull align 4 dereferenceable(6) %3, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(2) %48)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %49 = load i64, ptr %3, align 8
  ret i64 %49
}

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass