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

; 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.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.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = 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 i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef) #1 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 uwtable
define dso_local void @_ZN5Gecko5Graph5relaxEbj(ptr noundef nonnull align 8 dereferenceable(144) %0, i1 noundef zeroext %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.18", align 1
  %9 = alloca i1, align 1
  %10 = alloca i1, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  %14 = alloca %"class.std::allocator.18", align 1
  %15 = alloca i1, align 1
  %16 = alloca i1, align 1
  %17 = alloca i1, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %20 = zext i1 %1 to i8
  store i8 %20, ptr %5, align 1, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !11
  %21 = load ptr, ptr %4, align 8
  %22 = getelementptr inbounds %"class.Gecko::Graph", ptr %21, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = load i8, ptr %5, align 1, !tbaa !9, !range !27, !noundef !28
  %25 = trunc i8 %24 to i1
  store i1 false, ptr %9, align 1
  store i1 false, ptr %10, align 1
  store i1 false, ptr %13, align 1
  store i1 false, ptr %15, align 1
  store i1 false, ptr %16, align 1
  store i1 false, ptr %17, align 1
  br i1 %25, label %26, label %28

26:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  store i1 true, ptr %9, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #3
  store i1 true, ptr %10, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %27 unwind label %75

27:                                               ; preds = %26
  store i1 true, ptr %13, align 1
  br label %30

28:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  store i1 true, ptr %15, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  store i1 true, ptr %16, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %29 unwind label %79

29:                                               ; preds = %28
  store i1 true, ptr %17, align 1
  br label %30

30:                                               ; preds = %29, %27
  %31 = load ptr, ptr %23, align 8, !tbaa !29
  %32 = getelementptr inbounds ptr, ptr %31, i64 6
  %33 = load ptr, ptr %32, align 8
  invoke void %33(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %21, ptr noundef %7)
          to label %34 unwind label %83

34:                                               ; preds = %30
  %35 = load i1, ptr %17, align 1
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  br label %37

37:                                               ; preds = %36, %34
  %38 = load i1, ptr %16, align 1
  br i1 %38, label %39, label %40

39:                                               ; preds = %37
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  br label %40

40:                                               ; preds = %39, %37
  %41 = load i1, ptr %15, align 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  br label %43

43:                                               ; preds = %42, %40
  %44 = load i1, ptr %13, align 1
  br i1 %44, label %45, label %46

45:                                               ; preds = %43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  br label %46

46:                                               ; preds = %45, %43
  %47 = load i1, ptr %10, align 1
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #3
  br label %49

49:                                               ; preds = %48, %46
  %50 = load i1, ptr %9, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  br label %52

52:                                               ; preds = %51, %49
  br label %53

53:                                               ; preds = %130, %52
  %54 = load i32, ptr %6, align 4, !tbaa !11
  %55 = add i32 %54, -1
  store i32 %55, ptr %6, align 4, !tbaa !11
  %56 = icmp ne i32 %54, 0
  br i1 %56, label %57, label %131

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %127, %57
  %59 = load i32, ptr %18, align 4, !tbaa !11
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds %"class.Gecko::Graph", ptr %21, i32 0, i32 2
  %62 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #3
  %63 = icmp ult i64 %60, %62
  br i1 %63, label %64, label %72

64:                                               ; preds = %58
  %65 = getelementptr inbounds %"class.Gecko::Graph", ptr %21, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = load ptr, ptr %66, align 8, !tbaa !29
  %68 = getelementptr inbounds ptr, ptr %67, i64 8
  %69 = load ptr, ptr %68, align 8
  %70 = call noundef zeroext i1 %69(ptr noundef nonnull align 8 dereferenceable(8) %66)
  %71 = xor i1 %70, true
  br label %72

72:                                               ; preds = %64, %58
  %73 = phi i1 [ false, %58 ], [ %71, %64 ]
  br i1 %73, label %107, label %74

74:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %130

75:                                               ; preds = %26
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %11, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %12, align 4
  br label %100

79:                                               ; preds = %28
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %11, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %12, align 4
  br label %90

83:                                               ; preds = %30
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %11, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %12, align 4
  %87 = load i1, ptr %17, align 1
  br i1 %87, label %88, label %89

88:                                               ; preds = %83
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  br label %89

89:                                               ; preds = %88, %83
  br label %90

90:                                               ; preds = %89, %79
  %91 = load i1, ptr %16, align 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #3
  br label %93

93:                                               ; preds = %92, %90
  %94 = load i1, ptr %15, align 1
  br i1 %94, label %95, label %96

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  br label %96

96:                                               ; preds = %95, %93
  %97 = load i1, ptr %13, align 1
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #3
  br label %99

99:                                               ; preds = %98, %96
  br label %100

100:                                              ; preds = %99, %75
  %101 = load i1, ptr %10, align 1
  br i1 %101, label %102, label %103

102:                                              ; preds = %100
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #3
  br label %103

103:                                              ; preds = %102, %100
  %104 = load i1, ptr %9, align 1
  br i1 %104, label %105, label %106

105:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  br label %106

106:                                              ; preds = %105, %103
  br label %137

107:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %108 = getelementptr inbounds %"class.Gecko::Graph", ptr %21, i32 0, i32 2
  %109 = load i32, ptr %18, align 4, !tbaa !11
  %110 = zext i32 %109 to i64
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %110) #3
  %112 = load i32, ptr %111, align 4, !tbaa !11
  store i32 %112, ptr %19, align 4, !tbaa !11
  %113 = load i8, ptr %5, align 1, !tbaa !9, !range !27, !noundef !28
  %114 = trunc i8 %113 to i1
  br i1 %114, label %115, label %118

115:                                              ; preds = %107
  %116 = load i32, ptr %19, align 4, !tbaa !11
  %117 = call noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144) %21, i32 noundef %116)
  br i1 %117, label %126, label %118

118:                                              ; preds = %115, %107
  %119 = load i32, ptr %19, align 4, !tbaa !11
  %120 = call noundef float @_ZNK5Gecko5Graph7optimalEj(ptr noundef nonnull align 8 dereferenceable(144) %21, i32 noundef %119)
  %121 = getelementptr inbounds %"class.Gecko::Graph", ptr %21, i32 0, i32 3
  %122 = load i32, ptr %19, align 4, !tbaa !11
  %123 = zext i32 %122 to i64
  %124 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #3
  %125 = getelementptr inbounds %"class.Gecko::Node", ptr %124, i32 0, i32 0
  store float %120, ptr %125, align 4, !tbaa !31
  br label %126

126:                                              ; preds = %118, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %127

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

130:                                              ; preds = %74
  br label %53, !llvm.loop !36

131:                                              ; preds = %53
  call void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %21, i1 noundef zeroext true)
  %132 = getelementptr inbounds %"class.Gecko::Graph", ptr %21, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !13
  %134 = load ptr, ptr %133, align 8, !tbaa !29
  %135 = getelementptr inbounds ptr, ptr %134, i64 7
  %136 = load ptr, ptr %135, align 8
  call void %136(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef %21, i1 noundef zeroext true)
  ret void

137:                                              ; preds = %106
  %138 = load ptr, ptr %11, align 8
  %139 = load i32, ptr %12, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

; 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSN5Gecko5GraphE", !6, i64 0, !6, i64 8, !15, i64 16, !19, i64 40, !15, i64 64, !23, i64 88, !23, i64 112, !12, i64 136, !12, i64 140}
!15 = !{!"_ZTSSt6vectorIjSaIjEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIN5Gecko4NodeESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN5Gecko4NodeESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN5Gecko4NodeESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN5Gecko4NodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIfSaIfEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = !{!32, !33, i64 0}
!32 = !{!"_ZTSN5Gecko4NodeE", !33, i64 0, !33, i64 4, !12, i64 8, !12, i64 12}
!33 = !{!"float", !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}


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

@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = 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 i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) 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 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 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 uwtable
define dso_local void @_ZN5Gecko5Graph5relaxEbj(ptr noundef nonnull align 8 dereferenceable(144) %0, i1 noundef zeroext %1, i32 noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.18", align 1
  %6 = alloca %"class.std::allocator.18", align 1
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  br i1 %1, label %9, label %10

9:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %11 unwind label %49

10:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %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) %4, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %11 unwind label %51

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

15:                                               ; preds = %11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  %.not72 = icmp eq i32 %2, 0
  br i1 %1, label %.critedge48, label %.critedge48.thread

.critedge48:                                      ; preds = %15
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  br i1 %.not72, label %._crit_edge, label %.preheader.us.preheader

.critedge48.thread:                               ; preds = %15
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  br i1 %.not72, label %._crit_edge, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.critedge48.thread
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  br label %.preheader

.preheader.us.preheader:                          ; preds = %.critedge48
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %.critedge.us
  %.in78 = phi i32 [ %20, %.critedge.us ], [ %2, %.preheader.us.preheader ]
  %20 = add i32 %.in78, -1
  %21 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  %.not74 = icmp eq i64 %21, 0
  br i1 %.not74, label %.critedge.us, label %.lr.ph.us

.critedge.us:                                     ; preds = %36, %.lr.ph.us, %.preheader.us
  %.not.us = icmp eq i32 %20, 0
  br i1 %.not.us, label %._crit_edge, label %.preheader.us, !llvm.loop !25

.lr.ph.us:                                        ; preds = %.preheader.us, %36
  %22 = phi i64 [ %38, %36 ], [ 0, %.preheader.us ]
  %.02370.us.us = phi i32 [ %37, %36 ], [ 0, %.preheader.us ]
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %23, align 8, !tbaa !23
  %25 = getelementptr inbounds i8, ptr %24, i64 64
  %26 = load ptr, ptr %25, align 8
  %27 = call noundef zeroext i1 %26(ptr noundef nonnull align 8 dereferenceable(8) %23)
  br i1 %27, label %.critedge.us, label %28

28:                                               ; preds = %.lr.ph.us
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %22) #3
  %30 = load i32, ptr %29, align 4, !tbaa !27
  %31 = call noundef zeroext i1 @_ZNK5Gecko5Graph10persistentEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %30)
  br i1 %31, label %36, label %32

32:                                               ; preds = %28
  %33 = call noundef float @_ZNK5Gecko5Graph7optimalEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %30)
  %34 = zext i32 %30 to i64
  %35 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %34) #3
  store float %33, ptr %35, align 4, !tbaa !28
  br label %36

36:                                               ; preds = %32, %28
  %37 = add i32 %.02370.us.us, 1
  %38 = zext i32 %37 to i64
  %39 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  %40 = icmp ugt i64 %39, %38
  br i1 %40, label %.lr.ph.us, label %.critedge.us, !llvm.loop !31

.preheader:                                       ; preds = %.preheader.preheader, %.critedge
  %.in = phi i32 [ %41, %.critedge ], [ %2, %.preheader.preheader ]
  %41 = add i32 %.in, -1
  %42 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #3
  %.not73 = icmp eq i64 %42, 0
  br i1 %.not73, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %57
  %43 = phi i64 [ %64, %57 ], [ 0, %.preheader ]
  %.02370 = phi i32 [ %63, %57 ], [ 0, %.preheader ]
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = getelementptr inbounds i8, ptr %45, i64 64
  %47 = load ptr, ptr %46, align 8
  %48 = call noundef zeroext i1 %47(ptr noundef nonnull align 8 dereferenceable(8) %44)
  br i1 %48, label %.critedge, label %57

.critedge:                                        ; preds = %.lr.ph, %57, %.preheader
  %.not = icmp eq i32 %41, 0
  br i1 %.not, label %._crit_edge, label %.preheader, !llvm.loop !25

49:                                               ; preds = %9
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %56

51:                                               ; preds = %10
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %11
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  br i1 %1, label %56, label %55

55:                                               ; preds = %53, %51
  %.pn.ph = phi { ptr, i32 } [ %52, %51 ], [ %54, %53 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  br label %.critedge52

56:                                               ; preds = %53, %49
  %.pn.pn.ph = phi { ptr, i32 } [ %50, %49 ], [ %54, %53 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  br label %.critedge52

57:                                               ; preds = %.lr.ph
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %43) #3
  %59 = load i32, ptr %58, align 4, !tbaa !27
  %60 = call noundef float @_ZNK5Gecko5Graph7optimalEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %59)
  %61 = zext i32 %59 to i64
  %62 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN5Gecko4NodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %61) #3
  store float %60, ptr %62, align 4, !tbaa !28
  %63 = add i32 %.02370, 1
  %64 = zext i32 %63 to i64
  %65 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #3
  %66 = icmp ugt i64 %65, %64
  br i1 %66, label %.lr.ph, label %.critedge, !llvm.loop !31

._crit_edge:                                      ; preds = %.critedge, %.critedge.us, %.critedge48.thread, %.critedge48
  call void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, i1 noundef zeroext true)
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds i8, ptr %68, i64 56
  %70 = load ptr, ptr %69, align 8
  call void %70(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull %0, i1 noundef zeroext true)
  ret void

.critedge52:                                      ; preds = %55, %56
  %.pn.pn68 = phi { ptr, i32 } [ %.pn.ph, %55 ], [ %.pn.pn.ph, %56 ]
  resume { ptr, i32 } %.pn.pn68
}

; 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 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!22, !22, i64 0}
!28 = !{!29, !30, i64 0}
!29 = !{!"_ZTSN5Gecko4NodeE", !30, i64 0, !30, i64 4, !22, i64 8, !22, i64 12}
!30 = !{!"float", !8, i64 0}
!31 = distinct !{!31, !26}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass