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

; 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"

%"class.Riemann::DynamicArray" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.Maths::TIndex2" = type { i32, i32 }
%"class.Riemann::DynamicArray.50" = type { %"class.std::vector.51" }
%"class.std::vector.51" = type { %"struct.std::_Vector_base.52" }
%"struct.std::_Vector_base.52" = type { %"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.56" = type { ptr }
%"struct.Riemann::FMergeEdgesInfo" = type { i32, i32, %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.std::vector", %"class.std::vector" }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%class.anon = type { ptr }
%"class.__gnu_cxx::__normal_iterator.57" = type { ptr }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::GeometryBoolean" = type { i32, float, i8, i8, i8, i8, i8, float, float, i8, i8, i8, float, i8, float, i32, [2 x ptr], [2 x %"struct.Maths::Transform"], ptr, %"struct.Maths::Transform", %"class.std::vector", %"class.std::set", i8, [7 x i8], %"struct.Riemann::FIndexMapi" }
%"struct.Maths::Transform" = type { %"class.Maths::TVector3", %"class.Maths::Quaternion" }
%"class.Maths::Quaternion" = type { float, float, float, float }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_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 }
%"struct.Riemann::FIndexMapi" = type <{ %"class.std::map", %"class.std::map", i8, i8, [6 x i8] }>
%"class.std::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.Riemann::DynamicArray", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.Maths::TIndex2", align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.Riemann::DynamicArray.50", align 8
  %23 = alloca %"class.Riemann::DynamicArray", align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"class.Maths::TIndex2", align 4
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i8, align 1
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca %"class.Maths::TIndex2", align 4
  %36 = alloca ptr, align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  %39 = alloca %"class.Maths::TIndex2", align 4
  %40 = alloca %"struct.Riemann::FMergeEdgesInfo", align 8
  %41 = alloca i32, align 4
  %42 = alloca %"struct.std::pair", align 8
  %43 = alloca %class.anon, align 8
  %44 = alloca i8, align 1
  %45 = alloca float, align 4
  %46 = alloca ptr, align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %49 = alloca i32, align 4
  %50 = alloca %"class.Maths::TVector3", align 4
  %51 = alloca %"class.Maths::TVector3", align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca %"class.Maths::TVector3", align 4
  %55 = alloca %"class.Maths::TVector3", align 4
  %56 = alloca %"class.Maths::TVector3", align 4
  %57 = alloca %"class.Maths::TVector3", align 4
  %58 = alloca %"struct.Riemann::FMergeEdgesInfo", align 8
  %59 = alloca i32, align 4
  %60 = alloca %"struct.std::pair", align 8
  %61 = alloca ptr, align 8
  %62 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %63 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %64 = alloca i32, align 4
  %65 = alloca ptr, align 8
  %66 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %67 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %68 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %69, i32 0, i32 18
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  store ptr %71, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @_ZN7Riemann12DynamicArrayIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.std::vector", ptr %72, i64 1
  store ptr %73, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = call ptr @_ZNKSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #6
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = call ptr @_ZNKSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #6
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  br label %80

80:                                               ; preds = %134, %5
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %81, label %83, label %82

82:                                               ; preds = %80
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %138

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %85 = load i32, ptr %84, align 4, !tbaa !35
  store i32 %85, ptr %17, align 4, !tbaa !35
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds ptr, ptr %86, i64 1
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = load i32, ptr %17, align 4, !tbaa !35
  %90 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %88, i32 noundef %89)
          to label %91 unwind label %93

91:                                               ; preds = %83
  br i1 %90, label %97, label %92

92:                                               ; preds = %91
  store i32 3, ptr %16, align 4
  br label %131

93:                                               ; preds = %83
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %18, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %19, align 4
  br label %137

97:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds ptr, ptr %98, i64 1
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = load i32, ptr %17, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind writable sret(%"class.Maths::TIndex2") align 4 %20, ptr noundef nonnull align 8 dereferenceable(452) %100, i32 noundef %101)
          to label %102 unwind label %122

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.Maths::TIndex2", ptr %20, i32 0, i32 0
  %106 = load i32, ptr %105, align 4, !tbaa !36
  %107 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %104, i32 noundef %106)
          to label %108 unwind label %126

108:                                              ; preds = %102
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %"class.Maths::TIndex2", ptr %20, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !38
  %112 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %109, i32 noundef %111)
          to label %113 unwind label %126

113:                                              ; preds = %108
  %114 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %103, i32 noundef %107, i32 noundef %112)
          to label %115 unwind label %126

115:                                              ; preds = %113
  store i32 %114, ptr %21, align 4, !tbaa !35
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = load i32, ptr %21, align 4, !tbaa !35
  %118 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %116, i32 noundef %117)
          to label %119 unwind label %126

119:                                              ; preds = %115
  br i1 %118, label %120, label %130

120:                                              ; preds = %119
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %121 unwind label %126

121:                                              ; preds = %120
  br label %130

122:                                              ; preds = %97
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %18, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %19, align 4
  br label %136

126:                                              ; preds = %120, %115, %113, %108, %102
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %18, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %136

130:                                              ; preds = %121, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  store i32 0, ptr %16, align 4
  br label %131

131:                                              ; preds = %130, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  %132 = load i32, ptr %16, align 4
  switch i32 %132, label %608 [
    i32 0, label %133
    i32 3, label %134
  ]

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %133, %131
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %80

136:                                              ; preds = %126, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %137

137:                                              ; preds = %136, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %602

138:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  invoke void @_ZN7Riemann12DynamicArrayIN5Maths7TIndex2IiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %139 unwind label %152

139:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  invoke void @_ZN7Riemann12DynamicArrayIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %140 unwind label %156

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %"class.std::vector", ptr %141, i64 0
  store ptr %142, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %143 = load ptr, ptr %24, align 8, !tbaa !5
  %144 = call ptr @_ZNKSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %143) #6
  %145 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %144, ptr %145, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %146 = load ptr, ptr %24, align 8, !tbaa !5
  %147 = call ptr @_ZNKSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %146) #6
  %148 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %147, ptr %148, align 8
  br label %149

149:                                              ; preds = %257, %140
  %150 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  br i1 %150, label %160, label %151

151:                                              ; preds = %149
  store i32 4, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %264

152:                                              ; preds = %138
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %18, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %19, align 4
  br label %601

156:                                              ; preds = %139
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %18, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %19, align 4
  br label %600

160:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %162 = load i32, ptr %161, align 4, !tbaa !35
  store i32 %162, ptr %27, align 4, !tbaa !35
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = load i32, ptr %27, align 4, !tbaa !35
  %165 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %163, i32 noundef %164)
          to label %166 unwind label %168

166:                                              ; preds = %160
  br i1 %165, label %172, label %167

167:                                              ; preds = %166
  store i32 5, ptr %16, align 4
  br label %254

168:                                              ; preds = %160
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %18, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %19, align 4
  br label %263

172:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %173 = load ptr, ptr %11, align 8, !tbaa !5
  %174 = load i32, ptr %27, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind writable sret(%"class.Maths::TIndex2") align 4 %28, ptr noundef nonnull align 8 dereferenceable(452) %173, i32 noundef %174)
          to label %175 unwind label %212

175:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  %177 = getelementptr inbounds %"class.Maths::TIndex2", ptr %28, i32 0, i32 0
  %178 = invoke noundef ptr @_Z7MapFindIiiSt3mapIiiSt4lessIiESaISt4pairIKiiEEEEPKT0_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(48) %176, ptr noundef nonnull align 4 dereferenceable(4) %177)
          to label %179 unwind label %216

179:                                              ; preds = %175
  store ptr %178, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = getelementptr inbounds %"class.Maths::TIndex2", ptr %28, i32 0, i32 1
  %182 = invoke noundef ptr @_Z7MapFindIiiSt3mapIiiSt4lessIiESaISt4pairIKiiEEEEPKT0_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(48) %180, ptr noundef nonnull align 4 dereferenceable(4) %181)
          to label %183 unwind label %220

183:                                              ; preds = %179
  store ptr %182, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #6
  store i8 0, ptr %31, align 1, !tbaa !39
  %184 = load ptr, ptr %29, align 8, !tbaa !5
  %185 = icmp ne ptr %184, null
  br i1 %185, label %186, label %244

186:                                              ; preds = %183
  %187 = load ptr, ptr %30, align 8, !tbaa !5
  %188 = icmp ne ptr %187, null
  br i1 %188, label %189, label %244

189:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = load ptr, ptr %29, align 8, !tbaa !5
  %192 = load i32, ptr %191, align 4, !tbaa !35
  %193 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %190, i32 noundef %192)
          to label %194 unwind label %224

194:                                              ; preds = %189
  store i32 %193, ptr %32, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = load ptr, ptr %30, align 8, !tbaa !5
  %197 = load i32, ptr %196, align 4, !tbaa !35
  %198 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %195, i32 noundef %197)
          to label %199 unwind label %228

199:                                              ; preds = %194
  store i32 %198, ptr %33, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = load i32, ptr %32, align 4, !tbaa !35
  %202 = load i32, ptr %33, align 4, !tbaa !35
  %203 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %200, i32 noundef %201, i32 noundef %202)
          to label %204 unwind label %232

204:                                              ; preds = %199
  store i32 %203, ptr %34, align 4, !tbaa !35
  %205 = load i32, ptr %34, align 4, !tbaa !35
  %206 = icmp ne i32 %205, -1
  br i1 %206, label %207, label %240

207:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %208 = load i32, ptr %27, align 4, !tbaa !35
  %209 = load i32, ptr %34, align 4, !tbaa !35
  invoke void @_ZN5Maths7TIndex2IiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %35, i32 noundef %208, i32 noundef %209)
          to label %210 unwind label %236

210:                                              ; preds = %207
  invoke void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 4 dereferenceable(8) %35)
          to label %211 unwind label %236

211:                                              ; preds = %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  store i8 1, ptr %31, align 1, !tbaa !39
  br label %240

212:                                              ; preds = %172
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %18, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %19, align 4
  br label %262

216:                                              ; preds = %175
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %18, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %19, align 4
  br label %261

220:                                              ; preds = %179
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %18, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %19, align 4
  br label %260

224:                                              ; preds = %189
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %18, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %19, align 4
  br label %243

228:                                              ; preds = %194
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %18, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %19, align 4
  br label %242

232:                                              ; preds = %199
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %18, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %19, align 4
  br label %241

236:                                              ; preds = %210, %207
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %18, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br label %241

240:                                              ; preds = %211, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %244

241:                                              ; preds = %236, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %242

242:                                              ; preds = %241, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %243

243:                                              ; preds = %242, %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %259

244:                                              ; preds = %240, %186, %183
  %245 = load i8, ptr %31, align 1, !tbaa !39, !range !40, !noundef !41
  %246 = trunc i8 %245 to i1
  br i1 %246, label %253, label %247

247:                                              ; preds = %244
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %248 unwind label %249

248:                                              ; preds = %247
  br label %253

249:                                              ; preds = %247
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %18, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %19, align 4
  br label %259

253:                                              ; preds = %248, %244
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  store i32 0, ptr %16, align 4
  br label %254

254:                                              ; preds = %253, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  %255 = load i32, ptr %16, align 4
  switch i32 %255, label %608 [
    i32 0, label %256
    i32 5, label %257
  ]

256:                                              ; preds = %254
  br label %257

257:                                              ; preds = %256, %254
  %258 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  br label %149

259:                                              ; preds = %249, %243
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #6
  br label %260

260:                                              ; preds = %259, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %261

261:                                              ; preds = %260, %216
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %262

262:                                              ; preds = %261, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %263

263:                                              ; preds = %262, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %599

264:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  store ptr %22, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  %265 = load ptr, ptr %36, align 8, !tbaa !5
  %266 = call ptr @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %265) #6
  %267 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.56", ptr %37, i32 0, i32 0
  store ptr %266, ptr %267, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %268 = load ptr, ptr %36, align 8, !tbaa !5
  %269 = call ptr @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %268) #6
  %270 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.56", ptr %38, i32 0, i32 0
  store ptr %269, ptr %270, align 8
  br label %271

271:                                              ; preds = %335, %264
  %272 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #6
  br i1 %272, label %274, label %273

273:                                              ; preds = %271
  store i32 6, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  br label %339

274:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %275 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #6
  invoke void @_ZN5Maths7TIndex2IiEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(8) %275)
          to label %276 unwind label %289

276:                                              ; preds = %274
  %277 = load ptr, ptr %11, align 8, !tbaa !5
  %278 = getelementptr inbounds %"class.Maths::TIndex2", ptr %39, i32 0, i32 0
  %279 = load i32, ptr %278, align 4, !tbaa !36
  %280 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %277, i32 noundef %279)
          to label %281 unwind label %289

281:                                              ; preds = %276
  br i1 %280, label %282, label %288

282:                                              ; preds = %281
  %283 = load ptr, ptr %11, align 8, !tbaa !5
  %284 = getelementptr inbounds %"class.Maths::TIndex2", ptr %39, i32 0, i32 0
  %285 = load i32, ptr %284, align 4, !tbaa !36
  %286 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %283, i32 noundef %285)
          to label %287 unwind label %289

287:                                              ; preds = %282
  br i1 %286, label %293, label %288

288:                                              ; preds = %287, %281
  store i32 7, ptr %16, align 4
  br label %332

289:                                              ; preds = %282, %276, %274
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %18, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %19, align 4
  br label %338

293:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 88, ptr %40) #6
  invoke void @_ZN7Riemann15FMergeEdgesInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %40)
          to label %294 unwind label %307

294:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #6
  %295 = load ptr, ptr %11, align 8, !tbaa !5
  %296 = getelementptr inbounds %"class.Maths::TIndex2", ptr %39, i32 0, i32 0
  %297 = load i32, ptr %296, align 4, !tbaa !36
  %298 = getelementptr inbounds %"class.Maths::TIndex2", ptr %39, i32 0, i32 1
  %299 = load i32, ptr %298, align 4, !tbaa !38
  %300 = invoke noundef i32 @_ZN7Riemann11DynamicMesh10MergeEdgesEiiRNS_15FMergeEdgesInfoEb(ptr noundef nonnull align 8 dereferenceable(452) %295, i32 noundef %297, i32 noundef %299, ptr noundef nonnull align 8 dereferenceable(88) %40, i1 noundef zeroext true)
          to label %301 unwind label %311

301:                                              ; preds = %294
  store i32 %300, ptr %41, align 4, !tbaa !42
  %302 = load i32, ptr %41, align 4, !tbaa !42
  %303 = icmp ne i32 %302, 0
  br i1 %303, label %304, label %315

304:                                              ; preds = %301
  %305 = getelementptr inbounds %"class.Maths::TIndex2", ptr %39, i32 0, i32 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %305)
          to label %306 unwind label %311

306:                                              ; preds = %304
  br label %331

307:                                              ; preds = %293
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %18, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %19, align 4
  br label %337

311:                                              ; preds = %320, %304, %294
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %18, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %40) #6
  br label %337

315:                                              ; preds = %301
  %316 = load ptr, ptr %10, align 8, !tbaa !5
  %317 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %316, i32 0, i32 5
  %318 = load i8, ptr %317, align 1, !tbaa !44, !range !40, !noundef !41
  %319 = trunc i8 %318 to i1
  br i1 %319, label %320, label %330

320:                                              ; preds = %315
  %321 = load ptr, ptr %10, align 8, !tbaa !5
  %322 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %321, i32 0, i32 21
  %323 = getelementptr inbounds %"class.Maths::TIndex2", ptr %39, i32 0, i32 0
  %324 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %322, ptr noundef nonnull align 4 dereferenceable(4) %323)
          to label %325 unwind label %311

325:                                              ; preds = %320
  %326 = getelementptr inbounds { ptr, i8 }, ptr %42, i32 0, i32 0
  %327 = extractvalue { ptr, i8 } %324, 0
  store ptr %327, ptr %326, align 8
  %328 = getelementptr inbounds { ptr, i8 }, ptr %42, i32 0, i32 1
  %329 = extractvalue { ptr, i8 } %324, 1
  store i8 %329, ptr %328, align 8
  br label %330

330:                                              ; preds = %325, %315
  br label %331

331:                                              ; preds = %330, %306
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %40) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %40) #6
  store i32 0, ptr %16, align 4
  br label %332

332:                                              ; preds = %331, %288
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  %333 = load i32, ptr %16, align 4
  switch i32 %333, label %608 [
    i32 0, label %334
    i32 7, label %335
  ]

334:                                              ; preds = %332
  br label %335

335:                                              ; preds = %334, %332
  %336 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #6
  br label %271

337:                                              ; preds = %311, %307
  call void @llvm.lifetime.end.p0(i64 88, ptr %40) #6
  br label %338

338:                                              ; preds = %337, %289
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  br label %599

339:                                              ; preds = %273
  %340 = getelementptr inbounds %class.anon, ptr %43, i32 0, i32 0
  %341 = load ptr, ptr %10, align 8, !tbaa !5
  %342 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %341, i32 0, i32 18
  %343 = load ptr, ptr %342, align 8, !tbaa !9
  store ptr %343, ptr %340, align 8, !tbaa !45
  %344 = getelementptr inbounds %class.anon, ptr %43, i32 0, i32 0
  %345 = load ptr, ptr %344, align 8
  %346 = invoke noundef i64 @"_ZN7Riemann12DynamicArrayIiE9remove_ifIZNS_10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanEE3$_0EEmT_"(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr %345)
          to label %347 unwind label %367

347:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 1, ptr %44) #6
  store i8 1, ptr %44, align 1, !tbaa !39
  %348 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %349 = icmp ugt i64 %348, 0
  br i1 %349, label %350, label %562

350:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #6
  %351 = load ptr, ptr %10, align 8, !tbaa !5
  %352 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %351, i32 0, i32 1
  %353 = load float, ptr %352, align 4, !tbaa !47
  %354 = load ptr, ptr %10, align 8, !tbaa !5
  %355 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %354, i32 0, i32 1
  %356 = load float, ptr %355, align 4, !tbaa !47
  %357 = fmul float %353, %356
  store float %357, ptr %45, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  store ptr %12, ptr %46, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #6
  %358 = load ptr, ptr %46, align 8, !tbaa !5
  %359 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %358) #6
  %360 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %47, i32 0, i32 0
  store ptr %359, ptr %360, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #6
  %361 = load ptr, ptr %46, align 8, !tbaa !5
  %362 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %361) #6
  %363 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %48, i32 0, i32 0
  store ptr %362, ptr %363, align 8
  br label %364

364:                                              ; preds = %522, %350
  %365 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %48) #6
  br i1 %365, label %371, label %366

366:                                              ; preds = %364
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  br label %527

367:                                              ; preds = %339
  %368 = landingpad { ptr, i32 }
          cleanup
  %369 = extractvalue { ptr, i32 } %368, 0
  store ptr %369, ptr %18, align 8
  %370 = extractvalue { ptr, i32 } %368, 1
  store i32 %370, ptr %19, align 4
  br label %599

371:                                              ; preds = %364
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #6
  %372 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #6
  %373 = load i32, ptr %372, align 4, !tbaa !35
  store i32 %373, ptr %49, align 4, !tbaa !35
  %374 = load ptr, ptr %11, align 8, !tbaa !5
  %375 = load i32, ptr %49, align 4, !tbaa !35
  %376 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %374, i32 noundef %375)
          to label %377 unwind label %384

377:                                              ; preds = %371
  br i1 %376, label %378, label %383

378:                                              ; preds = %377
  %379 = load ptr, ptr %11, align 8, !tbaa !5
  %380 = load i32, ptr %49, align 4, !tbaa !35
  %381 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %379, i32 noundef %380)
          to label %382 unwind label %384

382:                                              ; preds = %378
  br i1 %381, label %388, label %383

383:                                              ; preds = %382, %377
  store i32 9, ptr %16, align 4
  br label %519

384:                                              ; preds = %378, %371
  %385 = landingpad { ptr, i32 }
          cleanup
  %386 = extractvalue { ptr, i32 } %385, 0
  store ptr %386, ptr %18, align 8
  %387 = extractvalue { ptr, i32 } %385, 1
  store i32 %387, ptr %19, align 4
  br label %526

388:                                              ; preds = %382
  call void @llvm.lifetime.start.p0(i64 12, ptr %50) #6
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %50)
          to label %389 unwind label %400

389:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 12, ptr %51) #6
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %51)
          to label %390 unwind label %404

390:                                              ; preds = %389
  %391 = load ptr, ptr %11, align 8, !tbaa !5
  %392 = load i32, ptr %49, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %391, i32 noundef %392, ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %51)
          to label %393 unwind label %404

393:                                              ; preds = %390
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #6
  store i32 0, ptr %52, align 4, !tbaa !35
  br label %394

394:                                              ; preds = %511, %393
  %395 = load i32, ptr %52, align 4, !tbaa !35
  %396 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %397 = trunc i64 %396 to i32
  %398 = icmp slt i32 %395, %397
  br i1 %398, label %408, label %399

399:                                              ; preds = %394
  store i32 10, ptr %16, align 4
  br label %517

400:                                              ; preds = %388
  %401 = landingpad { ptr, i32 }
          cleanup
  %402 = extractvalue { ptr, i32 } %401, 0
  store ptr %402, ptr %18, align 8
  %403 = extractvalue { ptr, i32 } %401, 1
  store i32 %403, ptr %19, align 4
  br label %525

404:                                              ; preds = %390, %389
  %405 = landingpad { ptr, i32 }
          cleanup
  %406 = extractvalue { ptr, i32 } %405, 0
  store ptr %406, ptr %18, align 8
  %407 = extractvalue { ptr, i32 } %405, 1
  store i32 %407, ptr %19, align 4
  br label %524

408:                                              ; preds = %394
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #6
  %409 = load i32, ptr %52, align 4, !tbaa !35
  %410 = sext i32 %409 to i64
  %411 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %410) #6
  %412 = load i32, ptr %411, align 4, !tbaa !35
  store i32 %412, ptr %53, align 4, !tbaa !35
  %413 = load ptr, ptr %11, align 8, !tbaa !5
  %414 = load i32, ptr %53, align 4, !tbaa !35
  %415 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %413, i32 noundef %414)
          to label %416 unwind label %427

416:                                              ; preds = %408
  br i1 %415, label %417, label %422

417:                                              ; preds = %416
  %418 = load ptr, ptr %11, align 8, !tbaa !5
  %419 = load i32, ptr %53, align 4, !tbaa !35
  %420 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %418, i32 noundef %419)
          to label %421 unwind label %427

421:                                              ; preds = %417
  br i1 %420, label %431, label %422

422:                                              ; preds = %421, %416
  %423 = load i32, ptr %52, align 4, !tbaa !35
  invoke void @_ZN7Riemann12DynamicArrayIiE9remove_atEib(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %423, i1 noundef zeroext false)
          to label %424 unwind label %427

424:                                              ; preds = %422
  %425 = load i32, ptr %52, align 4, !tbaa !35
  %426 = add nsw i32 %425, -1
  store i32 %426, ptr %52, align 4, !tbaa !35
  store i32 12, ptr %16, align 4
  br label %508

427:                                              ; preds = %422, %417, %408
  %428 = landingpad { ptr, i32 }
          cleanup
  %429 = extractvalue { ptr, i32 } %428, 0
  store ptr %429, ptr %18, align 8
  %430 = extractvalue { ptr, i32 } %428, 1
  store i32 %430, ptr %19, align 4
  br label %516

431:                                              ; preds = %421
  call void @llvm.lifetime.start.p0(i64 12, ptr %54) #6
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %54)
          to label %432 unwind label %475

432:                                              ; preds = %431
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #6
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %55)
          to label %433 unwind label %479

433:                                              ; preds = %432
  %434 = load ptr, ptr %11, align 8, !tbaa !5
  %435 = load i32, ptr %53, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %434, i32 noundef %435, ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %55)
          to label %436 unwind label %479

436:                                              ; preds = %433
  call void @llvm.lifetime.start.p0(i64 12, ptr %56) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %57) #6
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %56, ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %54)
          to label %437 unwind label %483

437:                                              ; preds = %436
  %438 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %56)
          to label %439 unwind label %483

439:                                              ; preds = %437
  %440 = load float, ptr %45, align 4, !tbaa !48
  %441 = fcmp olt float %438, %440
  br i1 %441, label %442, label %448

442:                                              ; preds = %439
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %57, ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %55)
          to label %443 unwind label %487

443:                                              ; preds = %442
  %444 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %57)
          to label %445 unwind label %487

445:                                              ; preds = %443
  %446 = load float, ptr %45, align 4, !tbaa !48
  %447 = fcmp olt float %444, %446
  br label %448

448:                                              ; preds = %445, %439
  %449 = phi i1 [ false, %439 ], [ %447, %445 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %56) #6
  br i1 %449, label %450, label %506

450:                                              ; preds = %448
  call void @llvm.lifetime.start.p0(i64 88, ptr %58) #6
  invoke void @_ZN7Riemann15FMergeEdgesInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %58)
          to label %451 unwind label %492

451:                                              ; preds = %450
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #6
  %452 = load ptr, ptr %11, align 8, !tbaa !5
  %453 = load i32, ptr %53, align 4, !tbaa !35
  %454 = load i32, ptr %49, align 4, !tbaa !35
  %455 = invoke noundef i32 @_ZN7Riemann11DynamicMesh10MergeEdgesEiiRNS_15FMergeEdgesInfoEb(ptr noundef nonnull align 8 dereferenceable(452) %452, i32 noundef %453, i32 noundef %454, ptr noundef nonnull align 8 dereferenceable(88) %58, i1 noundef zeroext true)
          to label %456 unwind label %496

456:                                              ; preds = %451
  store i32 %455, ptr %59, align 4, !tbaa !42
  %457 = load i32, ptr %59, align 4, !tbaa !42
  %458 = icmp eq i32 %457, 0
  br i1 %458, label %459, label %501

459:                                              ; preds = %456
  %460 = load i32, ptr %52, align 4, !tbaa !35
  invoke void @_ZN7Riemann12DynamicArrayIiE9remove_atEib(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %460, i1 noundef zeroext false)
          to label %461 unwind label %496

461:                                              ; preds = %459
  %462 = load ptr, ptr %10, align 8, !tbaa !5
  %463 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %462, i32 0, i32 5
  %464 = load i8, ptr %463, align 1, !tbaa !44, !range !40, !noundef !41
  %465 = trunc i8 %464 to i1
  br i1 %465, label %466, label %500

466:                                              ; preds = %461
  %467 = load ptr, ptr %10, align 8, !tbaa !5
  %468 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %467, i32 0, i32 21
  %469 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %468, ptr noundef nonnull align 4 dereferenceable(4) %53)
          to label %470 unwind label %496

470:                                              ; preds = %466
  %471 = getelementptr inbounds { ptr, i8 }, ptr %60, i32 0, i32 0
  %472 = extractvalue { ptr, i8 } %469, 0
  store ptr %472, ptr %471, align 8
  %473 = getelementptr inbounds { ptr, i8 }, ptr %60, i32 0, i32 1
  %474 = extractvalue { ptr, i8 } %469, 1
  store i8 %474, ptr %473, align 8
  br label %500

475:                                              ; preds = %431
  %476 = landingpad { ptr, i32 }
          cleanup
  %477 = extractvalue { ptr, i32 } %476, 0
  store ptr %477, ptr %18, align 8
  %478 = extractvalue { ptr, i32 } %476, 1
  store i32 %478, ptr %19, align 4
  br label %515

479:                                              ; preds = %433, %432
  %480 = landingpad { ptr, i32 }
          cleanup
  %481 = extractvalue { ptr, i32 } %480, 0
  store ptr %481, ptr %18, align 8
  %482 = extractvalue { ptr, i32 } %480, 1
  store i32 %482, ptr %19, align 4
  br label %514

483:                                              ; preds = %437, %436
  %484 = landingpad { ptr, i32 }
          cleanup
  %485 = extractvalue { ptr, i32 } %484, 0
  store ptr %485, ptr %18, align 8
  %486 = extractvalue { ptr, i32 } %484, 1
  store i32 %486, ptr %19, align 4
  br label %491

487:                                              ; preds = %443, %442
  %488 = landingpad { ptr, i32 }
          cleanup
  %489 = extractvalue { ptr, i32 } %488, 0
  store ptr %489, ptr %18, align 8
  %490 = extractvalue { ptr, i32 } %488, 1
  store i32 %490, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %57) #6
  br label %491

491:                                              ; preds = %487, %483
  call void @llvm.lifetime.end.p0(i64 12, ptr %56) #6
  br label %514

492:                                              ; preds = %450
  %493 = landingpad { ptr, i32 }
          cleanup
  %494 = extractvalue { ptr, i32 } %493, 0
  store ptr %494, ptr %18, align 8
  %495 = extractvalue { ptr, i32 } %493, 1
  store i32 %495, ptr %19, align 4
  br label %505

496:                                              ; preds = %466, %459, %451
  %497 = landingpad { ptr, i32 }
          cleanup
  %498 = extractvalue { ptr, i32 } %497, 0
  store ptr %498, ptr %18, align 8
  %499 = extractvalue { ptr, i32 } %497, 1
  store i32 %499, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #6
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %58) #6
  br label %505

500:                                              ; preds = %470, %461
  store i32 10, ptr %16, align 4
  br label %502

501:                                              ; preds = %456
  store i32 0, ptr %16, align 4
  br label %502

502:                                              ; preds = %501, %500
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #6
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %58) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %58) #6
  %503 = load i32, ptr %16, align 4
  switch i32 %503, label %507 [
    i32 0, label %504
  ]

504:                                              ; preds = %502
  br label %506

505:                                              ; preds = %496, %492
  call void @llvm.lifetime.end.p0(i64 88, ptr %58) #6
  br label %514

506:                                              ; preds = %504, %448
  store i32 0, ptr %16, align 4
  br label %507

507:                                              ; preds = %506, %502
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %54) #6
  br label %508

508:                                              ; preds = %507, %424
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #6
  %509 = load i32, ptr %16, align 4
  switch i32 %509, label %517 [
    i32 0, label %510
    i32 12, label %511
  ]

510:                                              ; preds = %508
  br label %511

511:                                              ; preds = %510, %508
  %512 = load i32, ptr %52, align 4, !tbaa !35
  %513 = add nsw i32 %512, 1
  store i32 %513, ptr %52, align 4, !tbaa !35
  br label %394, !llvm.loop !49

514:                                              ; preds = %505, %491, %479
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #6
  br label %515

515:                                              ; preds = %514, %475
  call void @llvm.lifetime.end.p0(i64 12, ptr %54) #6
  br label %516

516:                                              ; preds = %515, %427
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #6
  br label %524

517:                                              ; preds = %508, %399
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #6
  br label %518

518:                                              ; preds = %517
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %50) #6
  store i32 0, ptr %16, align 4
  br label %519

519:                                              ; preds = %518, %383
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  %520 = load i32, ptr %16, align 4
  switch i32 %520, label %608 [
    i32 0, label %521
    i32 9, label %522
  ]

521:                                              ; preds = %519
  br label %522

522:                                              ; preds = %521, %519
  %523 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #6
  br label %364

524:                                              ; preds = %516, %404
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #6
  br label %525

525:                                              ; preds = %524, %400
  call void @llvm.lifetime.end.p0(i64 12, ptr %50) #6
  br label %526

526:                                              ; preds = %525, %384
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  br label %561

527:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #6
  store ptr %23, ptr %61, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #6
  %528 = load ptr, ptr %61, align 8, !tbaa !5
  %529 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %528) #6
  %530 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %62, i32 0, i32 0
  store ptr %529, ptr %530, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #6
  %531 = load ptr, ptr %61, align 8, !tbaa !5
  %532 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %531) #6
  %533 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %63, i32 0, i32 0
  store ptr %532, ptr %533, align 8
  br label %534

534:                                              ; preds = %558, %527
  %535 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull align 8 dereferenceable(8) %63) #6
  br i1 %535, label %537, label %536

536:                                              ; preds = %534
  store i32 13, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #6
  br label %560

537:                                              ; preds = %534
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #6
  %538 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %62) #6
  %539 = load i32, ptr %538, align 4, !tbaa !35
  store i32 %539, ptr %64, align 4, !tbaa !35
  %540 = load ptr, ptr %11, align 8, !tbaa !5
  %541 = load i32, ptr %64, align 4, !tbaa !35
  %542 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %540, i32 noundef %541)
          to label %543 unwind label %553

543:                                              ; preds = %537
  br i1 %542, label %544, label %557

544:                                              ; preds = %543
  %545 = load ptr, ptr %11, align 8, !tbaa !5
  %546 = load i32, ptr %64, align 4, !tbaa !35
  %547 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %545, i32 noundef %546)
          to label %548 unwind label %553

548:                                              ; preds = %544
  br i1 %547, label %549, label %557

549:                                              ; preds = %548
  %550 = load ptr, ptr %10, align 8, !tbaa !5
  %551 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %550, i32 0, i32 20
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %551, ptr noundef nonnull align 4 dereferenceable(4) %64)
          to label %552 unwind label %553

552:                                              ; preds = %549
  store i8 0, ptr %44, align 1, !tbaa !39
  br label %557

553:                                              ; preds = %549, %544, %537
  %554 = landingpad { ptr, i32 }
          cleanup
  %555 = extractvalue { ptr, i32 } %554, 0
  store ptr %555, ptr %18, align 8
  %556 = extractvalue { ptr, i32 } %554, 1
  store i32 %556, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #6
  br label %561

557:                                              ; preds = %552, %548, %543
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #6
  br label %558

558:                                              ; preds = %557
  %559 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %62) #6
  br label %534

560:                                              ; preds = %536
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  br label %562

561:                                              ; preds = %553, %526
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  br label %598

562:                                              ; preds = %560, %347
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #6
  store ptr %12, ptr %65, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #6
  %563 = load ptr, ptr %65, align 8, !tbaa !5
  %564 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %563) #6
  %565 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %66, i32 0, i32 0
  store ptr %564, ptr %565, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #6
  %566 = load ptr, ptr %65, align 8, !tbaa !5
  %567 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %566) #6
  %568 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %67, i32 0, i32 0
  store ptr %567, ptr %568, align 8
  br label %569

569:                                              ; preds = %593, %562
  %570 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull align 8 dereferenceable(8) %67) #6
  br i1 %570, label %572, label %571

571:                                              ; preds = %569
  store i32 15, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #6
  br label %595

572:                                              ; preds = %569
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #6
  %573 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %66) #6
  %574 = load i32, ptr %573, align 4, !tbaa !35
  store i32 %574, ptr %68, align 4, !tbaa !35
  %575 = load ptr, ptr %11, align 8, !tbaa !5
  %576 = load i32, ptr %68, align 4, !tbaa !35
  %577 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %575, i32 noundef %576)
          to label %578 unwind label %588

578:                                              ; preds = %572
  br i1 %577, label %579, label %592

579:                                              ; preds = %578
  %580 = load ptr, ptr %11, align 8, !tbaa !5
  %581 = load i32, ptr %68, align 4, !tbaa !35
  %582 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %580, i32 noundef %581)
          to label %583 unwind label %588

583:                                              ; preds = %579
  br i1 %582, label %584, label %592

584:                                              ; preds = %583
  %585 = load ptr, ptr %10, align 8, !tbaa !5
  %586 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %585, i32 0, i32 20
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %586, ptr noundef nonnull align 4 dereferenceable(4) %68)
          to label %587 unwind label %588

587:                                              ; preds = %584
  store i8 0, ptr %44, align 1, !tbaa !39
  br label %592

588:                                              ; preds = %584, %579, %572
  %589 = landingpad { ptr, i32 }
          cleanup
  %590 = extractvalue { ptr, i32 } %589, 0
  store ptr %590, ptr %18, align 8
  %591 = extractvalue { ptr, i32 } %589, 1
  store i32 %591, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #6
  br label %598

592:                                              ; preds = %587, %583, %578
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #6
  br label %593

593:                                              ; preds = %592
  %594 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %66) #6
  br label %569

595:                                              ; preds = %571
  %596 = load i8, ptr %44, align 1, !tbaa !39, !range !40, !noundef !41
  %597 = trunc i8 %596 to i1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret i1 %597

598:                                              ; preds = %588, %561
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #6
  br label %599

599:                                              ; preds = %598, %367, %338, %263
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  br label %600

600:                                              ; preds = %599, %156
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  br label %601

601:                                              ; preds = %600, %152
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  br label %602

602:                                              ; preds = %601, %137
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %603

603:                                              ; preds = %602
  %604 = load ptr, ptr %18, align 8
  %605 = load i32, ptr %19, align 4
  %606 = insertvalue { ptr, i32 } poison, ptr %604, 0
  %607 = insertvalue { ptr, i32 } %606, i32 %605, 1
  resume { ptr, i32 } %607

608:                                              ; preds = %519, %332, %254, %131
  unreachable
}

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind noalias writable sret(%"class.Maths::TIndex2") align 4, ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7MapFindIiiSt3mapIiiSt4lessIiESaISt4pairIKiiEEEEPKT0_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths7TIndex2IiEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann15FMergeEdgesInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #4 align 2

declare noundef i32 @_ZN7Riemann11DynamicMesh10MergeEdgesEiiRNS_15FMergeEdgesInfoEb(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i1 noundef zeroext) #5

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i64 @"_ZN7Riemann12DynamicArrayIiE9remove_ifIZNS_10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanEE3$_0EEmT_"(ptr noundef nonnull align 8 dereferenceable(24), ptr) #4 align 2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann12DynamicArrayIiE9remove_atEib(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i1 noundef zeroext) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync 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 = { 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 = { 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 = { "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, !6, i64 120}
!10 = !{!"_ZTSN7Riemann15GeometryBooleanE", !11, i64 0, !12, i64 4, !13, i64 8, !13, i64 9, !13, i64 10, !13, i64 11, !13, i64 12, !12, i64 16, !12, i64 20, !13, i64 24, !13, i64 25, !13, i64 26, !12, i64 28, !13, i64 32, !12, i64 36, !14, i64 40, !7, i64 48, !7, i64 64, !6, i64 120, !15, i64 128, !18, i64 160, !22, i64 184, !13, i64 232, !31, i64 240}
!11 = !{!"_ZTSN7Riemann15GeometryBoolean9BooleanOpE", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN5Maths9TransformE", !16, i64 0, !17, i64 12}
!16 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!17 = !{!"_ZTSN5Maths10QuaternionE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessIiE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !30, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_ZTSN7Riemann10FIndexMapiE", !32, i64 0, !32, i64 48, !13, i64 96, !13, i64 97}
!32 = !{!"_ZTSSt3mapIiiSt4lessIiESaISt4pairIKiiEEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !25, i64 0, !27, i64 8}
!35 = !{!14, !14, i64 0}
!36 = !{!37, !14, i64 0}
!37 = !{!"_ZTSN5Maths7TIndex2IiEE", !14, i64 0, !14, i64 4}
!38 = !{!37, !14, i64 4}
!39 = !{!13, !13, i64 0}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = !{!43, !43, i64 0}
!43 = !{!"_ZTSN7Riemann11EMeshResultE", !7, i64 0}
!44 = !{!10, !13, i64 11}
!45 = !{!46, !6, i64 0}
!46 = !{!"_ZTSZN7Riemann10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanEE3$_0", !6, i64 0}
!47 = !{!10, !12, i64 4}
!48 = !{!12, !12, i64 0}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.Riemann::DynamicArray" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.Maths::TIndex2" = type { i32, i32 }
%"class.Riemann::DynamicArray.50" = type { %"class.std::vector.51" }
%"class.std::vector.51" = type { %"struct.std::_Vector_base.52" }
%"struct.std::_Vector_base.52" = type { %"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TIndex2<int>, std::allocator<Maths::TIndex2<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.56" = type { ptr }
%"struct.Riemann::FMergeEdgesInfo" = type { i32, i32, %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.std::vector", %"class.std::vector" }
%"class.__gnu_cxx::__normal_iterator.57" = type { ptr }
%"class.Maths::TVector3" = type { float, float, float }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.Riemann::DynamicArray", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.Maths::TIndex2", align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.Riemann::DynamicArray.50", align 8
  %12 = alloca %"class.Riemann::DynamicArray", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.Maths::TIndex2", align 4
  %17 = alloca %"class.Maths::TIndex2", align 4
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  %20 = alloca %"class.Maths::TIndex2", align 4
  %21 = alloca %"struct.Riemann::FMergeEdgesInfo", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %24 = alloca %"class.Maths::TVector3", align 4
  %25 = alloca %"class.Maths::TVector3", align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.Maths::TVector3", align 4
  %28 = alloca %"class.Maths::TVector3", align 4
  %29 = alloca %"class.Maths::TVector3", align 4
  %30 = alloca %"class.Maths::TVector3", align 4
  %31 = alloca %"struct.Riemann::FMergeEdgesInfo", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %34 = alloca i32, align 4
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %37 = alloca i32, align 4
  %38 = getelementptr inbounds i8, ptr %4, i64 120
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN7Riemann12DynamicArrayIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %40 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %41 = call ptr @_ZNKSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  store ptr %41, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %42 = call ptr @_ZNKSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  store ptr %42, ptr %8, align 8
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %43, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %44 = getelementptr inbounds i8, ptr %1, i64 8
  %45 = getelementptr inbounds i8, ptr %9, i64 4
  br label %50

._crit_edge:                                      ; preds = %74, %5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @_ZN7Riemann12DynamicArrayIN5Maths7TIndex2IiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN7Riemann12DynamicArrayIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %46 = call ptr @_ZNKSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  store ptr %46, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %47 = call ptr @_ZNKSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  store ptr %47, ptr %14, align 8
  %48 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %48, label %.lr.ph173, label %._crit_edge174

.lr.ph173:                                        ; preds = %._crit_edge
  %49 = getelementptr inbounds i8, ptr %16, i64 4
  br label %84

50:                                               ; preds = %.lr.ph, %74
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %52 = load i32, ptr %51, align 4, !tbaa !34
  %53 = load ptr, ptr %44, align 8, !tbaa !35
  %54 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %53, i32 noundef %52)
  br i1 %54, label %55, label %74

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %56 = load ptr, ptr %44, align 8, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TIndex2") align 4 %9, ptr noundef nonnull align 8 dereferenceable(452) %56, i32 noundef %52)
          to label %57 unwind label %69

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %58 = load i32, ptr %9, align 4, !tbaa !36
  %59 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %0, i32 noundef %58)
          to label %60 unwind label %71

60:                                               ; preds = %57
  %61 = load i32, ptr %45, align 4, !tbaa !38
  %62 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %0, i32 noundef %61)
          to label %63 unwind label %71

63:                                               ; preds = %60
  %64 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %59, i32 noundef %62)
          to label %65 unwind label %71

65:                                               ; preds = %63
  store i32 %64, ptr %10, align 4, !tbaa !34
  %66 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %64)
          to label %67 unwind label %71

67:                                               ; preds = %65
  br i1 %66, label %68, label %73

68:                                               ; preds = %67
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %73 unwind label %71

69:                                               ; preds = %55
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %77

71:                                               ; preds = %68, %65, %63, %60, %57
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br label %77

73:                                               ; preds = %68, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %74

74:                                               ; preds = %50, %73
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %76 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %76, label %50, label %._crit_edge

77:                                               ; preds = %71, %69
  %.pn147 = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %292

._crit_edge174:                                   ; preds = %129, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %78 = call ptr @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  store ptr %78, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %79 = call ptr @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  store ptr %79, ptr %19, align 8
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br i1 %80, label %.lr.ph176, label %._crit_edge177

.lr.ph176:                                        ; preds = %._crit_edge174
  %81 = getelementptr inbounds i8, ptr %20, i64 4
  %82 = getelementptr inbounds i8, ptr %4, i64 11
  %83 = getelementptr inbounds i8, ptr %4, i64 184
  br label %136

84:                                               ; preds = %.lr.ph173, %129
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %86 = load i32, ptr %85, align 4, !tbaa !34
  store i32 %86, ptr %15, align 4, !tbaa !34
  %87 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %86)
          to label %88 unwind label %89

88:                                               ; preds = %84
  br i1 %87, label %91, label %129

89:                                               ; preds = %84
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %133

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %92 = load i32, ptr %15, align 4, !tbaa !34
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TIndex2") align 4 %16, ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %92)
          to label %93 unwind label %112

93:                                               ; preds = %91
  %94 = invoke noundef ptr @_Z7MapFindIiiSt3mapIiiSt4lessIiESaISt4pairIKiiEEEEPKT0_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %95 unwind label %114

95:                                               ; preds = %93
  %96 = invoke noundef ptr @_Z7MapFindIiiSt3mapIiiSt4lessIiESaISt4pairIKiiEEEEPKT0_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %97 unwind label %116

97:                                               ; preds = %95
  %98 = icmp ne ptr %94, null
  %99 = icmp ne ptr %96, null
  %or.cond = and i1 %98, %99
  br i1 %or.cond, label %100, label %.critedge151

100:                                              ; preds = %97
  %101 = load i32, ptr %94, align 4, !tbaa !34
  %102 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %0, i32 noundef %101)
          to label %103 unwind label %118

103:                                              ; preds = %100
  %104 = load i32, ptr %96, align 4, !tbaa !34
  %105 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %0, i32 noundef %104)
          to label %106 unwind label %120

106:                                              ; preds = %103
  %107 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %102, i32 noundef %105)
          to label %108 unwind label %122

108:                                              ; preds = %106
  %.not135.not = icmp eq i32 %107, -1
  br i1 %.not135.not, label %.critedge151, label %109

109:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %110 = load i32, ptr %15, align 4, !tbaa !34
  call void @_ZN5Maths7TIndex2IiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %17, i32 noundef %110, i32 noundef %107)
  invoke void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %111 unwind label %124

111:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br label %128

112:                                              ; preds = %91
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %132

114:                                              ; preds = %93
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %132

116:                                              ; preds = %95
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %132

118:                                              ; preds = %100
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %132

120:                                              ; preds = %103
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %132

122:                                              ; preds = %106
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %132

124:                                              ; preds = %109
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  br label %132

.critedge151:                                     ; preds = %108, %97
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %128 unwind label %126

126:                                              ; preds = %.critedge151
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %132

128:                                              ; preds = %111, %.critedge151
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %129

129:                                              ; preds = %88, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %131 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %131, label %84, label %._crit_edge174

132:                                              ; preds = %114, %126, %120, %124, %122, %118, %116, %112
  %.pn140.pn.pn.pn = phi { ptr, i32 } [ %113, %112 ], [ %115, %114 ], [ %117, %116 ], [ %127, %126 ], [ %119, %118 ], [ %121, %120 ], [ %125, %124 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %133

133:                                              ; preds = %132, %89
  %.pn140.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn140.pn.pn.pn, %132 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %291

._crit_edge177:                                   ; preds = %163, %._crit_edge174
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %134 = load ptr, ptr %38, align 8, !tbaa !5
  %135 = invoke noundef i64 @"_ZN7Riemann12DynamicArrayIiE9remove_ifIZNS_10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanEE3$_0EEmT_"(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %134)
          to label %168 unwind label %183

136:                                              ; preds = %.lr.ph176, %163
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %137 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @_ZN5Maths7TIndex2IiEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %137)
  %138 = load i32, ptr %20, align 4, !tbaa !36
  %139 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %138)
  br i1 %139, label %140, label %163

140:                                              ; preds = %136
  %141 = load i32, ptr %20, align 4, !tbaa !36
  %142 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %141)
          to label %143 unwind label %144

143:                                              ; preds = %140
  br i1 %142, label %146, label %163

144:                                              ; preds = %140
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %167

146:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %21) #6
  invoke void @_ZN7Riemann15FMergeEdgesInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %21)
          to label %147 unwind label %153

147:                                              ; preds = %146
  %148 = load i32, ptr %20, align 4, !tbaa !36
  %149 = load i32, ptr %81, align 4, !tbaa !38
  %150 = invoke noundef i32 @_ZN7Riemann11DynamicMesh10MergeEdgesEiiRNS_15FMergeEdgesInfoEb(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %148, i32 noundef %149, ptr noundef nonnull align 8 dereferenceable(88) %21, i1 noundef zeroext true)
          to label %151 unwind label %155

151:                                              ; preds = %147
  %.not131 = icmp eq i32 %150, 0
  br i1 %.not131, label %157, label %152

152:                                              ; preds = %151
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %162 unwind label %155

153:                                              ; preds = %146
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %166

155:                                              ; preds = %160, %152, %147
  %156 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %21) #6
  br label %166

157:                                              ; preds = %151
  %158 = load i8, ptr %82, align 1, !tbaa !39, !range !40, !noundef !41
  %159 = trunc nuw i8 %158 to i1
  br i1 %159, label %160, label %162

160:                                              ; preds = %157
  %161 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %83, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %162 unwind label %155

162:                                              ; preds = %160, %157, %152
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %21) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %21) #6
  br label %163

163:                                              ; preds = %136, %143, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %165 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  br i1 %165, label %136, label %._crit_edge177

166:                                              ; preds = %155, %153
  %.pn132 = phi { ptr, i32 } [ %156, %155 ], [ %154, %153 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %21) #6
  br label %167

167:                                              ; preds = %166, %144
  %.pn132.pn = phi { ptr, i32 } [ %.pn132, %166 ], [ %145, %144 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %291

168:                                              ; preds = %._crit_edge177
  %169 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %.not = icmp eq i64 %169, 0
  br i1 %.not, label %272, label %170

170:                                              ; preds = %168
  %171 = getelementptr inbounds i8, ptr %4, i64 4
  %172 = load float, ptr %171, align 4, !tbaa !42
  %173 = fmul float %172, %172
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  %174 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %174, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  %175 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %175, ptr %23, align 8
  %176 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %176, label %.lr.ph181, label %._crit_edge182

.lr.ph181:                                        ; preds = %170
  %177 = getelementptr inbounds i8, ptr %4, i64 11
  %178 = getelementptr inbounds i8, ptr %4, i64 184
  br label %185

._crit_edge182:                                   ; preds = %253, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #6
  %179 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  store ptr %179, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #6
  %180 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  store ptr %180, ptr %33, align 8
  %181 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  br i1 %181, label %.lr.ph185, label %._crit_edge186

.lr.ph185:                                        ; preds = %._crit_edge182
  %182 = getelementptr inbounds i8, ptr %4, i64 160
  br label %258

183:                                              ; preds = %._crit_edge177
  %184 = landingpad { ptr, i32 }
          cleanup
  br label %291

185:                                              ; preds = %.lr.ph181, %253
  %186 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %187 = load i32, ptr %186, align 4, !tbaa !34
  %188 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %187)
  br i1 %188, label %189, label %253

189:                                              ; preds = %185
  %190 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %187)
          to label %191 unwind label %192

191:                                              ; preds = %189
  br i1 %190, label %194, label %253

192:                                              ; preds = %189
  %193 = landingpad { ptr, i32 }
          cleanup
  br label %257

194:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #6
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %24)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #6
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %25)
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %187, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %25)
          to label %.preheader unwind label %198

.preheader:                                       ; preds = %194
  %195 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %196 = trunc i64 %195 to i32
  %197 = icmp sgt i32 %196, 0
  br i1 %197, label %.lr.ph179, label %.loopexit

198:                                              ; preds = %194
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %256

.lr.ph179:                                        ; preds = %.preheader, %246
  %.0115178 = phi i32 [ %247, %246 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #6
  %200 = sext i32 %.0115178 to i64
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %200) #6
  %202 = load i32, ptr %201, align 4, !tbaa !34
  store i32 %202, ptr %26, align 4, !tbaa !34
  %203 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %202)
  br i1 %203, label %204, label %208

204:                                              ; preds = %.lr.ph179
  %205 = load i32, ptr %26, align 4, !tbaa !34
  %206 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %205)
          to label %207 unwind label %210

207:                                              ; preds = %204
  br i1 %206, label %212, label %208

208:                                              ; preds = %207, %.lr.ph179
  invoke void @_ZN7Riemann12DynamicArrayIiE9remove_atEib(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef %.0115178, i1 noundef zeroext false)
          to label %.thread155 unwind label %210

.thread155:                                       ; preds = %208
  %209 = add nsw i32 %.0115178, -1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #6
  br label %246

210:                                              ; preds = %208, %204
  %211 = landingpad { ptr, i32 }
          cleanup
  br label %252

212:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %27) #6
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %28) #6
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %28)
  %213 = load i32, ptr %26, align 4, !tbaa !34
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %213, ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(12) %28)
          to label %214 unwind label %233

214:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #6
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %27)
          to label %215 unwind label %235

215:                                              ; preds = %214
  %216 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %29)
  %217 = fcmp olt float %216, %173
  br i1 %217, label %218, label %.critedge

218:                                              ; preds = %215
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %28)
          to label %219 unwind label %237

219:                                              ; preds = %218
  %220 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %30)
  %221 = fcmp olt float %220, %173
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #6
  br i1 %221, label %222, label %.thread160

222:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %31) #6
  invoke void @_ZN7Riemann15FMergeEdgesInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %31)
          to label %223 unwind label %240

223:                                              ; preds = %222
  %224 = load i32, ptr %26, align 4, !tbaa !34
  %225 = invoke noundef i32 @_ZN7Riemann11DynamicMesh10MergeEdgesEiiRNS_15FMergeEdgesInfoEb(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %224, i32 noundef %187, ptr noundef nonnull align 8 dereferenceable(88) %31, i1 noundef zeroext true)
          to label %226 unwind label %.loopexit162

226:                                              ; preds = %223
  %.not130 = icmp eq i32 %225, 0
  br i1 %.not130, label %227, label %243

227:                                              ; preds = %226
  invoke void @_ZN7Riemann12DynamicArrayIiE9remove_atEib(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef %.0115178, i1 noundef zeroext false)
          to label %228 unwind label %.loopexit.split-lp

228:                                              ; preds = %227
  %229 = load i8, ptr %177, align 1, !tbaa !39, !range !40, !noundef !41
  %230 = trunc nuw i8 %229 to i1
  br i1 %230, label %231, label %245

231:                                              ; preds = %228
  %232 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %178, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %245 unwind label %.loopexit.split-lp

233:                                              ; preds = %212
  %234 = landingpad { ptr, i32 }
          cleanup
  br label %251

235:                                              ; preds = %214
  %236 = landingpad { ptr, i32 }
          cleanup
  br label %239

237:                                              ; preds = %218
  %238 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #6
  br label %239

239:                                              ; preds = %237, %235
  %.pn = phi { ptr, i32 } [ %238, %237 ], [ %236, %235 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #6
  br label %251

240:                                              ; preds = %222
  %241 = landingpad { ptr, i32 }
          cleanup
  br label %244

.loopexit162:                                     ; preds = %223
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %242

.loopexit.split-lp:                               ; preds = %227, %231
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %242

242:                                              ; preds = %.loopexit.split-lp, %.loopexit162
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit162 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %31) #6
  br label %244

243:                                              ; preds = %226
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %31) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %31) #6
  br label %.thread160

244:                                              ; preds = %242, %240
  %.pn122 = phi { ptr, i32 } [ %lpad.phi, %242 ], [ %241, %240 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %31) #6
  br label %251

.critedge:                                        ; preds = %215
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #6
  br label %.thread160

.thread160:                                       ; preds = %243, %.critedge, %219
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #6
  br label %246

245:                                              ; preds = %228, %231
  call void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %31) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #6
  br label %.loopexit

246:                                              ; preds = %.thread160, %.thread155
  %.1116158 = phi i32 [ %209, %.thread155 ], [ %.0115178, %.thread160 ]
  %247 = add nsw i32 %.1116158, 1
  %248 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %249 = trunc i64 %248 to i32
  %250 = icmp slt i32 %247, %249
  br i1 %250, label %.lr.ph179, label %.loopexit, !llvm.loop !43

251:                                              ; preds = %244, %239, %233
  %.pn122.pn = phi { ptr, i32 } [ %.pn122, %244 ], [ %.pn, %239 ], [ %234, %233 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #6
  br label %252

252:                                              ; preds = %251, %210
  %.pn122.pn.pn = phi { ptr, i32 } [ %.pn122.pn, %251 ], [ %211, %210 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #6
  br label %256

.loopexit:                                        ; preds = %246, %.preheader, %245
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #6
  br label %253

253:                                              ; preds = %185, %191, %.loopexit
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %255 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %255, label %185, label %._crit_edge182

256:                                              ; preds = %252, %198
  %.pn122.pn.pn.pn = phi { ptr, i32 } [ %.pn122.pn.pn, %252 ], [ %199, %198 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #6
  br label %257

257:                                              ; preds = %256, %192
  %.pn122.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn122.pn.pn.pn, %256 ], [ %193, %192 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %291

._crit_edge186:                                   ; preds = %269, %._crit_edge182
  %.0110.lcssa = phi i1 [ true, %._crit_edge182 ], [ %.1111, %269 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #6
  br label %272

258:                                              ; preds = %.lr.ph185, %269
  %.0110183 = phi i1 [ true, %.lr.ph185 ], [ %.1111, %269 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #6
  %259 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  %260 = load i32, ptr %259, align 4, !tbaa !34
  store i32 %260, ptr %34, align 4, !tbaa !34
  %261 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %260)
  br i1 %261, label %262, label %269

262:                                              ; preds = %258
  %263 = load i32, ptr %34, align 4, !tbaa !34
  %264 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %263)
          to label %265 unwind label %267

265:                                              ; preds = %262
  br i1 %264, label %266, label %269

266:                                              ; preds = %265
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %182, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %269 unwind label %267

267:                                              ; preds = %266, %262
  %268 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #6
  br label %291

269:                                              ; preds = %266, %265, %258
  %.1111 = phi i1 [ %.0110183, %265 ], [ %.0110183, %258 ], [ false, %266 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #6
  %270 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  %271 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  br i1 %271, label %258, label %._crit_edge186

272:                                              ; preds = %._crit_edge186, %168
  %.2112 = phi i1 [ %.0110.lcssa, %._crit_edge186 ], [ true, %168 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #6
  %273 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %273, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #6
  %274 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %274, ptr %36, align 8
  %275 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #6
  br i1 %275, label %.lr.ph189, label %._crit_edge190

.lr.ph189:                                        ; preds = %272
  %276 = getelementptr inbounds i8, ptr %4, i64 160
  br label %277

._crit_edge190:                                   ; preds = %288, %272
  %.3113.lcssa = phi i1 [ %.2112, %272 ], [ %.4114, %288 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  ret i1 %.3113.lcssa

277:                                              ; preds = %.lr.ph189, %288
  %.3113187 = phi i1 [ %.2112, %.lr.ph189 ], [ %.4114, %288 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %37) #6
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #6
  %279 = load i32, ptr %278, align 4, !tbaa !34
  store i32 %279, ptr %37, align 4, !tbaa !34
  %280 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %279)
  br i1 %280, label %281, label %288

281:                                              ; preds = %277
  %282 = load i32, ptr %37, align 4, !tbaa !34
  %283 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %39, i32 noundef %282)
          to label %284 unwind label %286

284:                                              ; preds = %281
  br i1 %283, label %285, label %288

285:                                              ; preds = %284
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %276, ptr noundef nonnull align 4 dereferenceable(4) %37)
          to label %288 unwind label %286

286:                                              ; preds = %285, %281
  %287 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #6
  br label %291

288:                                              ; preds = %285, %284, %277
  %.4114 = phi i1 [ %.3113187, %284 ], [ %.3113187, %277 ], [ false, %285 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %37) #6
  %289 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #6
  %290 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #6
  br i1 %290, label %277, label %._crit_edge190

291:                                              ; preds = %286, %267, %257, %183, %167, %133
  %.pn140.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn140.pn.pn.pn.pn, %133 ], [ %.pn132.pn, %167 ], [ %184, %183 ], [ %287, %286 ], [ %.pn122.pn.pn.pn.pn, %257 ], [ %268, %267 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %292

292:                                              ; preds = %291, %77
  %.pn147.pn = phi { ptr, i32 } [ %.pn147, %77 ], [ %.pn140.pn.pn.pn.pn.pn, %291 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn147.pn
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind noalias writable sret(%"class.Maths::TIndex2") align 4, ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z7MapFindIiiSt3mapIiiSt4lessIiESaISt4pairIKiiEEEEPKT0_RKT1_RKT_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths7TIndex2IiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN5Maths7TIndex2IiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths7TIndex2IiEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann15FMergeEdgesInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #4 align 2

declare noundef i32 @_ZN7Riemann11DynamicMesh10MergeEdgesEiiRNS_15FMergeEdgesInfoEb(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i1 noundef zeroext) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann15FMergeEdgesInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i64 @"_ZN7Riemann12DynamicArrayIiE9remove_ifIZNS_10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanEE3$_0EEmT_"(ptr noundef nonnull align 8 dereferenceable(24), ptr) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann12DynamicArrayIiE9remove_atEib(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i1 noundef zeroext) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync 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 = { 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 = { 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 = { "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, !13, i64 120}
!6 = !{!"_ZTSN7Riemann15GeometryBooleanE", !7, i64 0, !10, i64 4, !11, i64 8, !11, i64 9, !11, i64 10, !11, i64 11, !11, i64 12, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 25, !11, i64 26, !10, i64 28, !11, i64 32, !10, i64 36, !12, i64 40, !8, i64 48, !8, i64 64, !13, i64 120, !14, i64 128, !17, i64 160, !21, i64 184, !11, i64 232, !30, i64 240}
!7 = !{!"_ZTSN7Riemann15GeometryBoolean9BooleanOpE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN5Maths9TransformE", !15, i64 0, !16, i64 12}
!15 = !{!"_ZTSN5Maths8TVector3IfEE", !10, i64 0, !10, i64 4, !10, i64 8}
!16 = !{!"_ZTSN5Maths10QuaternionE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!17 = !{!"_ZTSSt6vectorIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!21 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !22, i64 0}
!22 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !23, i64 0}
!23 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !24, i64 0, !26, i64 8}
!24 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !25, i64 0}
!25 = !{!"_ZTSSt4lessIiE"}
!26 = !{!"_ZTSSt15_Rb_tree_header", !27, i64 0, !29, i64 32}
!27 = !{!"_ZTSSt18_Rb_tree_node_base", !28, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!28 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!29 = !{!"long", !8, i64 0}
!30 = !{!"_ZTSN7Riemann10FIndexMapiE", !31, i64 0, !31, i64 48, !11, i64 96, !11, i64 97}
!31 = !{!"_ZTSSt3mapIiiSt4lessIiESaISt4pairIKiiEEE", !32, i64 0}
!32 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !24, i64 0, !26, i64 8}
!34 = !{!12, !12, i64 0}
!35 = !{!13, !13, i64 0}
!36 = !{!37, !12, i64 0}
!37 = !{!"_ZTSN5Maths7TIndex2IiEE", !12, i64 0, !12, i64 4}
!38 = !{!37, !12, i64 4}
!39 = !{!6, !11, i64 11}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = !{!6, !10, i64 4}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass