; LLVM IR from mfem/mfem :: general/gecko.ll (ZN5Gecko5Graph6refineEPKS0_)

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.21 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.21 = type { i64, [8 x i8] }
%"class.std::allocator.18" = type { i8 }
%class.DynamicHeap = type <{ %"class.std::vector.22", %"class.std::map", [8 x i8] }>
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned int>, std::_Select1st<std::pair<const unsigned int, unsigned int>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned int>, std::_Select1st<std::pair<const unsigned int, unsigned int>>, std::less<unsigned 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 }
%"class.Gecko::Graph" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.0", %"class.std::vector", %"class.std::vector.5", %"class.std::vector.5", i32, i32 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Gecko::Node, std::allocator<Gecko::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Gecko::Node, std::allocator<Gecko::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Gecko::Node, std::allocator<Gecko::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Gecko::Node, std::allocator<Gecko::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Gecko::Node" = type { float, float, i32, i32 }

@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK5Gecko5Graph7optimalEj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6insertEjf(ptr noundef nonnull align 8 dereferenceable(73), i32 noundef, float noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6updateEjf(ptr noundef nonnull align 8 dereferenceable(73), i32 noundef, float noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Gecko5Graph6refineEPKS0_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.18", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.DynamicHeap, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8
  %21 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %23 unwind label %35

23:                                               ; preds = %2
  %24 = load ptr, ptr %22, align 8, !tbaa !24
  %25 = getelementptr inbounds ptr, ptr %24, i64 6
  %26 = load ptr, ptr %25, align 8
  invoke void %26(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef %20, ptr noundef %5)
          to label %27 unwind label %39

27:                                               ; preds = %23
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #3
  call void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEEC2Em(ptr noundef nonnull align 8 dereferenceable(73) %9, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !26
  br label %28

28:                                               ; preds = %127, %27
  %29 = load i32, ptr %10, align 4, !tbaa !26
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 3
  %32 = call noundef i64 @_ZNKSt6vectorIN5Gecko4NodeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #3
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %44, label %34

34:                                               ; preds = %28
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %131

35:                                               ; preds = %2
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %7, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %8, align 4
  br label %43

39:                                               ; preds = %23
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  br label %43

43:                                               ; preds = %39, %35
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  br label %208

44:                                               ; preds = %28
  %45 = load i32, ptr %10, align 4, !tbaa !26
  %46 = invoke noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef %45)
          to label %47 unwind label %67

47:                                               ; preds = %44
  br i1 %46, label %48, label %71

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %49 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 3
  %50 = load i32, ptr %10, align 4, !tbaa !26
  %51 = zext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %51) #3
  %53 = getelementptr inbounds %"class.Gecko::Node", ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 4, !tbaa !27
  store i32 %54, ptr %12, align 4, !tbaa !26
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.Gecko::Graph", ptr %55, i32 0, i32 3
  %57 = load i32, ptr %12, align 4, !tbaa !26
  %58 = zext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #3
  %60 = getelementptr inbounds %"class.Gecko::Node", ptr %59, i32 0, i32 0
  %61 = load float, ptr %60, align 4, !tbaa !30
  %62 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 3
  %63 = load i32, ptr %10, align 4, !tbaa !26
  %64 = zext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #3
  %66 = getelementptr inbounds %"class.Gecko::Node", ptr %65, i32 0, i32 0
  store float %61, ptr %66, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %126

67:                                               ; preds = %44
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  br label %130

71:                                               ; preds = %47
  %72 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 3
  %73 = load i32, ptr %10, align 4, !tbaa !26
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #3
  %76 = getelementptr inbounds %"class.Gecko::Node", ptr %75, i32 0, i32 0
  store float -1.000000e+00, ptr %76, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store float 0.000000e+00, ptr %13, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %77 = load i32, ptr %10, align 4, !tbaa !26
  %78 = invoke noundef i32 @_ZNK5Gecko5Graph10node_beginEj(ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef %77)
          to label %79 unwind label %87

79:                                               ; preds = %71
  store i32 %78, ptr %14, align 4, !tbaa !26
  br label %80

80:                                               ; preds = %113, %79
  %81 = load i32, ptr %14, align 4, !tbaa !26
  %82 = load i32, ptr %10, align 4, !tbaa !26
  %83 = invoke noundef i32 @_ZNK5Gecko5Graph8node_endEj(ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef %82)
          to label %84 unwind label %87

84:                                               ; preds = %80
  %85 = icmp ult i32 %81, %83
  br i1 %85, label %91, label %86

86:                                               ; preds = %84
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %117

87:                                               ; preds = %80, %71
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %7, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %8, align 4
  br label %116

91:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %92 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 4
  %93 = load i32, ptr %14, align 4, !tbaa !26
  %94 = zext i32 %93 to i64
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %94) #3
  %96 = load i32, ptr %95, align 4, !tbaa !26
  store i32 %96, ptr %15, align 4, !tbaa !26
  %97 = load i32, ptr %15, align 4, !tbaa !26
  %98 = invoke noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef %97)
          to label %99 unwind label %108

99:                                               ; preds = %91
  br i1 %98, label %100, label %112

100:                                              ; preds = %99
  %101 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 5
  %102 = load i32, ptr %14, align 4, !tbaa !26
  %103 = zext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #3
  %105 = load float, ptr %104, align 4, !tbaa !31
  %106 = load float, ptr %13, align 4, !tbaa !31
  %107 = fadd float %106, %105
  store float %107, ptr %13, align 4, !tbaa !31
  br label %112

108:                                              ; preds = %91
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %7, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %116

112:                                              ; preds = %100, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %14, align 4, !tbaa !26
  %115 = add i32 %114, 1
  store i32 %115, ptr %14, align 4, !tbaa !26
  br label %80, !llvm.loop !32

116:                                              ; preds = %108, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %125

117:                                              ; preds = %86
  %118 = load i32, ptr %10, align 4, !tbaa !26
  %119 = load float, ptr %13, align 4, !tbaa !31
  invoke void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6insertEjf(ptr noundef nonnull align 8 dereferenceable(73) %9, i32 noundef %118, float noundef %119)
          to label %120 unwind label %121

120:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %126

121:                                              ; preds = %117
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %7, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %8, align 4
  br label %125

125:                                              ; preds = %121, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %130

126:                                              ; preds = %120, %48
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %10, align 4, !tbaa !26
  %129 = add i32 %128, 1
  store i32 %129, ptr %10, align 4, !tbaa !26
  br label %28, !llvm.loop !34

130:                                              ; preds = %125, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %207

131:                                              ; preds = %34
  br label %132

132:                                              ; preds = %197, %131
  %133 = invoke noundef zeroext i1 @_ZNK11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(73) %9)
          to label %134 unwind label %157

134:                                              ; preds = %132
  %135 = xor i1 %133, true
  br i1 %135, label %136, label %199

136:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !26
  %137 = invoke noundef zeroext i1 @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE7extractERj(ptr noundef nonnull align 8 dereferenceable(73) %9, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %138 unwind label %161

138:                                              ; preds = %136
  %139 = load i32, ptr %16, align 4, !tbaa !26
  %140 = invoke noundef float @_ZNK5Gecko5Graph7optimalEj(ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef %139)
          to label %141 unwind label %161

141:                                              ; preds = %138
  %142 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 3
  %143 = load i32, ptr %16, align 4, !tbaa !26
  %144 = zext i32 %143 to i64
  %145 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef %144) #3
  %146 = getelementptr inbounds %"class.Gecko::Node", ptr %145, i32 0, i32 0
  store float %140, ptr %146, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %147 = load i32, ptr %16, align 4, !tbaa !26
  %148 = invoke noundef i32 @_ZNK5Gecko5Graph10node_beginEj(ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef %147)
          to label %149 unwind label %165

149:                                              ; preds = %141
  store i32 %148, ptr %17, align 4, !tbaa !26
  br label %150

150:                                              ; preds = %193, %149
  %151 = load i32, ptr %17, align 4, !tbaa !26
  %152 = load i32, ptr %16, align 4, !tbaa !26
  %153 = invoke noundef i32 @_ZNK5Gecko5Graph8node_endEj(ptr noundef nonnull align 8 dereferenceable(144) %20, i32 noundef %152)
          to label %154 unwind label %165

154:                                              ; preds = %150
  %155 = icmp ult i32 %151, %153
  br i1 %155, label %169, label %156

156:                                              ; preds = %154
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %197

157:                                              ; preds = %200, %199, %132
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %7, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %8, align 4
  br label %207

161:                                              ; preds = %138, %136
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %7, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %8, align 4
  br label %198

165:                                              ; preds = %150, %141
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %7, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %8, align 4
  br label %196

169:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %170 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 4
  %171 = load i32, ptr %17, align 4, !tbaa !26
  %172 = zext i32 %171 to i64
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %170, i64 noundef %172) #3
  %174 = load i32, ptr %173, align 4, !tbaa !26
  store i32 %174, ptr %18, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %175 = load i32, ptr %18, align 4, !tbaa !26
  %176 = invoke noundef zeroext i1 @_ZNK11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE4findEjRf(ptr noundef nonnull align 8 dereferenceable(73) %9, i32 noundef %175, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %177 unwind label %188

177:                                              ; preds = %169
  br i1 %176, label %178, label %192

178:                                              ; preds = %177
  %179 = load i32, ptr %18, align 4, !tbaa !26
  %180 = load float, ptr %19, align 4, !tbaa !31
  %181 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 5
  %182 = load i32, ptr %17, align 4, !tbaa !26
  %183 = zext i32 %182 to i64
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %183) #3
  %185 = load float, ptr %184, align 4, !tbaa !31
  %186 = fadd float %180, %185
  invoke void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6updateEjf(ptr noundef nonnull align 8 dereferenceable(73) %9, i32 noundef %179, float noundef %186)
          to label %187 unwind label %188

187:                                              ; preds = %178
  br label %192

188:                                              ; preds = %178, %169
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %7, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %196

192:                                              ; preds = %187, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %17, align 4, !tbaa !26
  %195 = add i32 %194, 1
  store i32 %195, ptr %17, align 4, !tbaa !26
  br label %150, !llvm.loop !35

196:                                              ; preds = %188, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %198

197:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %132, !llvm.loop !36

198:                                              ; preds = %196, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %207

199:                                              ; preds = %134
  invoke void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %20, i1 noundef zeroext true)
          to label %200 unwind label %157

200:                                              ; preds = %199
  %201 = getelementptr inbounds %"class.Gecko::Graph", ptr %20, i32 0, i32 1
  %202 = load ptr, ptr %201, align 8, !tbaa !9
  %203 = load ptr, ptr %202, align 8, !tbaa !24
  %204 = getelementptr inbounds ptr, ptr %203, i64 7
  %205 = load ptr, ptr %204, align 8
  invoke void %205(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef %20, i1 noundef zeroext true)
          to label %206 unwind label %157

206:                                              ; preds = %200
  call void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(73) %9) #3
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #3
  ret void

207:                                              ; preds = %198, %157, %130
  call void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(73) %9) #3
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #3
  br label %208

208:                                              ; preds = %207, %43
  %209 = load ptr, ptr %7, align 8
  %210 = load i32, ptr %8, align 4
  %211 = insertvalue { ptr, i32 } poison, ptr %209, 0
  %212 = insertvalue { ptr, i32 } %211, i32 %210, 1
  resume { ptr, i32 } %212
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE7extractERj(ptr noundef nonnull align 8 dereferenceable(73), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144), i1 noundef zeroext) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 8}
!10 = !{!"_ZTSN5Gecko5GraphE", !6, i64 0, !6, i64 8, !11, i64 16, !15, i64 40, !11, i64 64, !19, i64 88, !19, i64 112, !23, i64 136, !23, i64 140}
!11 = !{!"_ZTSSt6vectorIjSaIjEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSSt6vectorIN5Gecko4NodeESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN5Gecko4NodeESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN5Gecko4NodeESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN5Gecko4NodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIfSaIfEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"int", !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !8, i64 0}
!26 = !{!23, !23, i64 0}
!27 = !{!28, !23, i64 12}
!28 = !{!"_ZTSN5Gecko4NodeE", !29, i64 0, !29, i64 4, !23, i64 8, !23, i64 12}
!29 = !{!"float", !7, i64 0}
!30 = !{!28, !29, i64 0}
!31 = !{!29, !29, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !33}


; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.21 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.21 = type { i64, [8 x i8] }
%"class.std::allocator.18" = type { i8 }
%class.DynamicHeap = type <{ %"class.std::vector.22", %"class.std::map", [8 x i8] }>
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynamicHeap<unsigned int, float>::HeapEntry, std::allocator<DynamicHeap<unsigned int, float>::HeapEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned int>, std::_Select1st<std::pair<const unsigned int, unsigned int>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned int>, std::_Select1st<std::pair<const unsigned int, unsigned int>>, std::less<unsigned 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 }

@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK5Gecko5Graph7optimalEj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6insertEjf(ptr noundef nonnull align 8 dereferenceable(73), i32 noundef, float noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6updateEjf(ptr noundef nonnull align 8 dereferenceable(73), i32 noundef, float noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Gecko5Graph6refineEPKS0_(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.18", align 1
  %5 = alloca %class.DynamicHeap, align 8
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %10 unwind label %24

10:                                               ; preds = %2
  %11 = load ptr, ptr %9, align 8, !tbaa !23
  %12 = getelementptr inbounds i8, ptr %11, i64 48
  %13 = load ptr, ptr %12, align 8
  invoke void %13(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %0, ptr noundef nonnull %3)
          to label %14 unwind label %26

14:                                               ; preds = %10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #3
  call void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEEC2Em(ptr noundef nonnull align 8 dereferenceable(73) %5, i64 noundef 0)
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  %16 = call noundef i64 @_ZNKSt6vectorIN5Gecko4NodeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #3
  %17 = icmp ugt i64 %16, 1
  br i1 %17, label %.lr.ph47, label %.preheader

.lr.ph47:                                         ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  %19 = getelementptr inbounds i8, ptr %0, i64 88
  %20 = getelementptr inbounds i8, ptr %1, i64 40
  br label %29

.preheader:                                       ; preds = %58, %14
  %21 = call noundef zeroext i1 @_ZNK11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(73) %5)
  br i1 %21, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %.preheader
  %22 = getelementptr inbounds i8, ptr %0, i64 64
  %23 = getelementptr inbounds i8, ptr %0, i64 88
  br label %63

24:                                               ; preds = %2
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %10
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #3
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  br label %107

29:                                               ; preds = %.lr.ph47, %58
  %30 = phi i64 [ 1, %.lr.ph47 ], [ %60, %58 ]
  %.03445 = phi i32 [ 1, %.lr.ph47 ], [ %59, %58 ]
  %31 = call noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.03445)
  %32 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %30) #3
  br i1 %31, label %33, label %40

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %32, i64 12
  %35 = load i32, ptr %34, align 4, !tbaa !25
  %36 = zext i32 %35 to i64
  %37 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %36) #3
  %38 = load float, ptr %37, align 4, !tbaa !28
  %39 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %30) #3
  store float %38, ptr %39, align 4, !tbaa !28
  br label %58

40:                                               ; preds = %29
  store float -1.000000e+00, ptr %32, align 4, !tbaa !28
  %41 = call noundef i32 @_ZNK5Gecko5Graph10node_beginEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.03445)
  %42 = call noundef i32 @_ZNK5Gecko5Graph8node_endEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.03445)
  %43 = icmp ult i32 %41, %42
  br i1 %43, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %40
  %44 = zext i32 %41 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %52, %40
  %.032.lcssa = phi float [ 0.000000e+00, %40 ], [ %.133, %52 ]
  invoke void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6insertEjf(ptr noundef nonnull align 8 dereferenceable(73) %5, i32 noundef %.03445, float noundef %.032.lcssa)
          to label %58 unwind label %56

.lr.ph:                                           ; preds = %.lr.ph.preheader, %52
  %indvars.iv = phi i64 [ %44, %.lr.ph.preheader ], [ %indvars.iv.next, %52 ]
  %.03243 = phi float [ 0.000000e+00, %.lr.ph.preheader ], [ %.133, %52 ]
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #3
  %46 = load i32, ptr %45, align 4, !tbaa !29
  %47 = call noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %46)
  br i1 %47, label %48, label %52

48:                                               ; preds = %.lr.ph
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv) #3
  %50 = load float, ptr %49, align 4, !tbaa !30
  %51 = fadd float %.03243, %50
  br label %52

52:                                               ; preds = %48, %.lr.ph
  %.133 = phi float [ %51, %48 ], [ %.03243, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %53 = call noundef i32 @_ZNK5Gecko5Graph8node_endEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.03445)
  %54 = zext i32 %53 to i64
  %55 = icmp ult i64 %indvars.iv.next, %54
  br i1 %55, label %.lr.ph, label %._crit_edge, !llvm.loop !31

56:                                               ; preds = %._crit_edge
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %106

58:                                               ; preds = %._crit_edge, %33
  %59 = add i32 %.03445, 1
  %60 = zext i32 %59 to i64
  %61 = call noundef i64 @_ZNKSt6vectorIN5Gecko4NodeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #3
  %62 = icmp ugt i64 %61, %60
  br i1 %62, label %29, label %.preheader, !llvm.loop !33

63:                                               ; preds = %.lr.ph53, %._crit_edge52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  store i32 0, ptr %6, align 4, !tbaa !29
  %64 = invoke noundef zeroext i1 @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE7extractERj(ptr noundef nonnull align 8 dereferenceable(73) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %65 unwind label %81

65:                                               ; preds = %63
  %66 = load i32, ptr %6, align 4, !tbaa !29
  %67 = invoke noundef float @_ZNK5Gecko5Graph7optimalEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %66)
          to label %68 unwind label %81

68:                                               ; preds = %65
  %69 = load i32, ptr %6, align 4, !tbaa !29
  %70 = zext i32 %69 to i64
  %71 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %70) #3
  store float %67, ptr %71, align 4, !tbaa !28
  %72 = load i32, ptr %6, align 4, !tbaa !29
  %73 = call noundef i32 @_ZNK5Gecko5Graph10node_beginEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %72)
  %74 = load i32, ptr %6, align 4, !tbaa !29
  %75 = call noundef i32 @_ZNK5Gecko5Graph8node_endEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %74)
  %76 = icmp ult i32 %73, %75
  br i1 %76, label %.lr.ph51.preheader, label %._crit_edge52

.lr.ph51.preheader:                               ; preds = %68
  %77 = zext i32 %73 to i64
  br label %.lr.ph51

._crit_edge52:                                    ; preds = %94, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  %78 = call noundef zeroext i1 @_ZNK11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(73) %5)
  br i1 %78, label %._crit_edge54, label %63, !llvm.loop !34

79:                                               ; preds = %100, %._crit_edge54
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %106

81:                                               ; preds = %65, %63
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %99

.lr.ph51:                                         ; preds = %.lr.ph51.preheader, %94
  %indvars.iv56 = phi i64 [ %77, %.lr.ph51.preheader ], [ %indvars.iv.next57, %94 ]
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv56) #3
  %84 = load i32, ptr %83, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %85 = invoke noundef zeroext i1 @_ZNK11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE4findEjRf(ptr noundef nonnull align 8 dereferenceable(73) %5, i32 noundef %84, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %86 unwind label %92

86:                                               ; preds = %.lr.ph51
  br i1 %85, label %87, label %94

87:                                               ; preds = %86
  %88 = load float, ptr %7, align 4, !tbaa !30
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv56) #3
  %90 = load float, ptr %89, align 4, !tbaa !30
  %91 = fadd float %88, %90
  invoke void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEE6updateEjf(ptr noundef nonnull align 8 dereferenceable(73) %5, i32 noundef %84, float noundef %91)
          to label %94 unwind label %92

92:                                               ; preds = %87, %.lr.ph51
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  br label %99

94:                                               ; preds = %87, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %95 = load i32, ptr %6, align 4, !tbaa !29
  %96 = call noundef i32 @_ZNK5Gecko5Graph8node_endEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %95)
  %97 = zext i32 %96 to i64
  %98 = icmp ult i64 %indvars.iv.next57, %97
  br i1 %98, label %.lr.ph51, label %._crit_edge52, !llvm.loop !35

99:                                               ; preds = %92, %81
  %.pn37 = phi { ptr, i32 } [ %93, %92 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  br label %106

._crit_edge54:                                    ; preds = %._crit_edge52, %.preheader
  invoke void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, i1 noundef zeroext true)
          to label %100 unwind label %79

100:                                              ; preds = %._crit_edge54
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = load ptr, ptr %101, align 8, !tbaa !23
  %103 = getelementptr inbounds i8, ptr %102, i64 56
  %104 = load ptr, ptr %103, align 8
  invoke void %104(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull %0, i1 noundef zeroext true)
          to label %105 unwind label %79

105:                                              ; preds = %100
  call void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(73) %5) #3
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #3
  ret void

106:                                              ; preds = %99, %79, %56
  %.pn39 = phi { ptr, i32 } [ %57, %56 ], [ %.pn37, %99 ], [ %80, %79 ]
  call void @_ZN11DynamicHeapIjfSt4lessIfESt3mapIjjS0_IjESaISt4pairIKjjEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(73) %5) #3
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #3
  br label %107

107:                                              ; preds = %106, %28
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %106 ], [ %.pn, %28 ]
  resume { ptr, i32 } %.pn39.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144), i1 noundef zeroext) local_unnamed_addr #2 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN5Gecko5GraphE", !7, i64 0, !7, i64 8, !10, i64 16, !14, i64 40, !10, i64 64, !18, i64 88, !18, i64 112, !22, i64 136, !22, i64 140}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIjSaIjEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!14 = !{!"_ZTSSt6vectorIN5Gecko4NodeESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN5Gecko4NodeESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN5Gecko4NodeESaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN5Gecko4NodeESaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!"_ZTSSt6vectorIfSaIfEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!22 = !{!"int", !8, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !9, i64 0}
!25 = !{!26, !22, i64 12}
!26 = !{!"_ZTSN5Gecko4NodeE", !27, i64 0, !27, i64 4, !22, i64 8, !22, i64 12}
!27 = !{!"float", !8, i64 0}
!28 = !{!26, !27, i64 0}
!29 = !{!22, !22, i64 0}
!30 = !{!27, !27, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}
!35 = distinct !{!35, !32}


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