; LLVM IR from atlantis13579/Riemann :: Src/Geometry (GeometryAttributes)

; 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.Riemann::DynamicMesh::Edge" = type { %"class.Maths::TIndex2", %"class.Maths::TIndex2" }
%"class.Maths::TIndex2" = type { i32, i32 }
%"class.Riemann::DynamicMeshAttributeSet" = type { ptr, ptr, %"class.std::vector.51", %"class.std::vector.56", ptr, %"class.std::vector.61", %"class.std::map", %"class.std::vector.71" }
%"class.std::vector.51" = type { %"struct.std::_Vector_base.52" }
%"struct.std::_Vector_base.52" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.56" = type { %"struct.std::_Vector_base.57" }
%"struct.std::_Vector_base.57" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.61" = type { %"struct.std::_Vector_base.62" }
%"struct.std::_Vector_base.62" = type { %"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.66" }
%"class.std::_Rb_tree.66" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.71" = type { %"struct.std::_Vector_base.72" }
%"struct.std::_Vector_base.72" = type { %"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7Riemann23DynamicMeshAttributeSet22IsMaterialBoundaryEdgeEi = external hidden unnamed_addr constant [73 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 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) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet22IsMaterialBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1) #3 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.Riemann::DynamicMesh::Edge", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %12 = load ptr, ptr %4, align 8
  %13 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %12, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %61

17:                                               ; preds = %2
  %18 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %12, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !38
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %19, i32 noundef %20)
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  br label %25

23:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.35, ptr noundef @.str.1, i32 noundef 1146, ptr noundef @__PRETTY_FUNCTION__._ZNK7Riemann23DynamicMeshAttributeSet22IsMaterialBoundaryEdgeEi) #5
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %22
  %26 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %12, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !38
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %27, i32 noundef %28)
  br i1 %29, label %30, label %60

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %31 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %12, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !38
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN7Riemann11DynamicMesh7GetEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %32, i32 noundef %33)
  call void @_ZN7Riemann11DynamicMesh4EdgeC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %34)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %35 = getelementptr inbounds %"struct.Riemann::DynamicMesh::Edge", ptr %6, i32 0, i32 1
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %35, i32 noundef 0)
  %37 = load i32, ptr %36, align 4, !tbaa !9
  store i32 %37, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %38 = getelementptr inbounds %"struct.Riemann::DynamicMesh::Edge", ptr %6, i32 0, i32 1
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %38, i32 noundef 1)
  %40 = load i32, ptr %39, align 4, !tbaa !9
  store i32 %40, ptr %8, align 4, !tbaa !9
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %46, label %43

43:                                               ; preds = %30
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = icmp eq i32 %44, -1
  br i1 %45, label %46, label %47

46:                                               ; preds = %43, %30
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %59

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %48 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %12, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = call noundef i32 @_ZNK7Riemann35TDynamicMeshScalarTriangleAttributeIiE8GetValueEi(ptr noundef nonnull align 8 dereferenceable(72) %49, i32 noundef %50)
  store i32 %51, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %52 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %12, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = call noundef i32 @_ZNK7Riemann35TDynamicMeshScalarTriangleAttributeIiE8GetValueEi(ptr noundef nonnull align 8 dereferenceable(72) %53, i32 noundef %54)
  store i32 %55, ptr %11, align 4, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = icmp ne i32 %56, %57
  store i1 %58, ptr %3, align 1
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %59

59:                                               ; preds = %47, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %61

60:                                               ; preds = %25
  store i1 false, ptr %3, align 1
  br label %61

61:                                               ; preds = %60, %59, %16
  %62 = load i1, ptr %3, align 1
  ret i1 %62
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann11DynamicMesh4EdgeC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann35TDynamicMeshScalarTriangleAttributeIiE8GetValueEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #2 align 2

attributes #0 = { 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 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 = { 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 = { noreturn nounwind }
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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN7Riemann23DynamicMeshAttributeSetE", !6, i64 0, !6, i64 8, !13, i64 16, !17, i64 40, !6, i64 64, !21, i64 72, !25, i64 96, !34, i64 144}
!13 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !26, i64 0}
!26 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !27, i64 0}
!27 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !28, i64 0, !30, i64 8}
!28 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !29, i64 0}
!29 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!30 = !{!"_ZTSSt15_Rb_tree_header", !31, i64 0, !33, i64 32}
!31 = !{!"_ZTSSt18_Rb_tree_node_base", !32, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!32 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!33 = !{!"long", !7, i64 0}
!34 = !{!"_ZTSSt6vectorIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!12, !6, i64 0}


; 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.Riemann::DynamicMesh::Edge" = type { %"class.Maths::TIndex2", %"class.Maths::TIndex2" }
%"class.Maths::TIndex2" = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7Riemann23DynamicMeshAttributeSet22IsMaterialBoundaryEdgeEi = external hidden unnamed_addr constant [73 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet22IsMaterialBoundaryEdgeEi(ptr nocapture noundef nonnull readonly align 8 dereferenceable(168) %0, i32 noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %"struct.Riemann::DynamicMesh::Edge", align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %31, label %7

7:                                                ; preds = %2
  %8 = load ptr, ptr %0, align 8, !tbaa !35
  %9 = tail call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %8, i32 noundef %1)
  br i1 %9, label %11, label %10

10:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.1, i32 noundef 1146, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7Riemann23DynamicMeshAttributeSet22IsMaterialBoundaryEdgeEi) #5
  unreachable

11:                                               ; preds = %7
  %12 = load ptr, ptr %0, align 8, !tbaa !35
  %13 = tail call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %12, i32 noundef %1)
  br i1 %13, label %14, label %31

14:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %15 = load ptr, ptr %0, align 8, !tbaa !35
  %16 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZN7Riemann11DynamicMesh7GetEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %15, i32 noundef %1)
  call void @_ZN7Riemann11DynamicMesh4EdgeC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(16) %16)
  %17 = getelementptr inbounds i8, ptr %3, i64 8
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %17, i32 noundef 0)
  %19 = load i32, ptr %18, align 4, !tbaa !36
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %17, i32 noundef 1)
  %21 = load i32, ptr %20, align 4, !tbaa !36
  %22 = icmp eq i32 %19, -1
  %23 = icmp eq i32 %21, -1
  %or.cond = select i1 %22, i1 true, i1 %23
  br i1 %or.cond, label %30, label %24

24:                                               ; preds = %14
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call noundef i32 @_ZNK7Riemann35TDynamicMeshScalarTriangleAttributeIiE8GetValueEi(ptr noundef nonnull align 8 dereferenceable(72) %25, i32 noundef %19)
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef i32 @_ZNK7Riemann35TDynamicMeshScalarTriangleAttributeIiE8GetValueEi(ptr noundef nonnull align 8 dereferenceable(72) %27, i32 noundef %21)
  %29 = icmp ne i32 %26, %28
  br label %30

30:                                               ; preds = %14, %24
  %.0 = phi i1 [ %29, %24 ], [ false, %14 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  br label %31

31:                                               ; preds = %11, %2, %30
  %.1 = phi i1 [ %.0, %30 ], [ false, %2 ], [ false, %11 ]
  ret i1 %.1
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann11DynamicMesh4EdgeC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann35TDynamicMeshScalarTriangleAttributeIiE8GetValueEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #2 align 2

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 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 = { 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 = { noreturn nounwind }
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, !7, i64 8}
!6 = !{!"_ZTSN7Riemann23DynamicMeshAttributeSetE", !7, i64 0, !7, i64 8, !10, i64 16, !14, i64 40, !7, i64 64, !18, i64 72, !22, i64 96, !31, i64 144}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!14 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!"_ZTSSt6vectorIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!22 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !30, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!30 = !{!"long", !8, i64 0}
!31 = !{!"_ZTSSt6vectorIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!35 = !{!6, !7, i64 0}
!36 = !{!37, !37, i64 0}
!37 = !{!"int", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass