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

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

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 void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; 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
declare dso_local void @_ZN5Gecko5Graph6vcycleEjj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Gecko5Graph5orderEPNS_10FunctionalEjjjjPNS_8ProgressE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6) #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i1, align 1
  %17 = alloca float, align 4
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 0
  store ptr %24, ptr %25, align 8, !tbaa !11
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  store i1 false, ptr %16, align 1
  br i1 %27, label %28, label %30

28:                                               ; preds = %7
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  br label %32

30:                                               ; preds = %7
  %31 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #5
  store ptr %31, ptr %15, align 8
  store i1 true, ptr %16, align 1
  call void @_ZN5Gecko8ProgressC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  br label %32

32:                                               ; preds = %30, %28
  %33 = phi ptr [ %29, %28 ], [ %31, %30 ]
  %34 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  store ptr %33, ptr %34, align 8, !tbaa !25
  store ptr %33, ptr %14, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 7
  store i32 0, ptr %35, align 8, !tbaa !26
  br label %36

36:                                               ; preds = %43, %32
  %37 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 7
  %38 = load i32, ptr %37, align 8, !tbaa !26
  %39 = shl i32 1, %38
  %40 = call noundef i32 @_ZNK5Gecko5Graph5nodesEv(ptr noundef nonnull align 8 dereferenceable(144) %23)
  %41 = icmp ult i32 %39, %40
  br i1 %41, label %42, label %47

42:                                               ; preds = %36
  br label %43

43:                                               ; preds = %42
  %44 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 7
  %45 = load i32, ptr %44, align 8, !tbaa !26
  %46 = add i32 %45, 1
  store i32 %46, ptr %44, align 8, !tbaa !26
  br label %36, !llvm.loop !27

47:                                               ; preds = %36
  call void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %23, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %48 = call noundef float @_ZNK5Gecko5Graph4costEv(ptr noundef nonnull align 8 dereferenceable(144) %23)
  store float %48, ptr %17, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %49 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 2
  call void @_ZNSt6vectorIjSaIjEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %49)
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %59

52:                                               ; preds = %47
  %53 = load i32, ptr %13, align 4, !tbaa !9
  invoke void @_ZN5Gecko5Graph7shuffleEj(ptr noundef nonnull align 8 dereferenceable(144) %23, i32 noundef %53)
          to label %54 unwind label %55

54:                                               ; preds = %52
  br label %59

55:                                               ; preds = %148, %146, %143, %66, %59, %52
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %19, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %20, align 4
  br label %170

59:                                               ; preds = %54, %47
  %60 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !25
  %62 = load float, ptr %17, align 4, !tbaa !29
  %63 = load ptr, ptr %61, align 8, !tbaa !31
  %64 = getelementptr inbounds ptr, ptr %63, i64 2
  %65 = load ptr, ptr %64, align 8
  invoke void %65(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef %23, float noundef %62)
          to label %66 unwind label %55

66:                                               ; preds = %59
  %67 = invoke noundef i32 @_ZNK5Gecko5Graph5edgesEv(ptr noundef nonnull align 8 dereferenceable(144) %23)
          to label %68 unwind label %55

68:                                               ; preds = %66
  %69 = icmp ne i32 %67, 0
  br i1 %69, label %70, label %148

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 1, ptr %21, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %139, %70
  %72 = load i32, ptr %21, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = icmp ule i32 %72, %73
  br i1 %74, label %75, label %84

75:                                               ; preds = %71
  %76 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !25
  %78 = load ptr, ptr %77, align 8, !tbaa !31
  %79 = getelementptr inbounds ptr, ptr %78, i64 8
  %80 = load ptr, ptr %79, align 8
  %81 = invoke noundef zeroext i1 %80(ptr noundef nonnull align 8 dereferenceable(8) %77)
          to label %82 unwind label %87

82:                                               ; preds = %75
  %83 = xor i1 %81, true
  br label %84

84:                                               ; preds = %82, %71
  %85 = phi i1 [ false, %71 ], [ %83, %82 ]
  br i1 %85, label %91, label %86

86:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %143

87:                                               ; preds = %102, %100, %91, %75
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %19, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %20, align 4
  br label %142

91:                                               ; preds = %84
  %92 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = load i32, ptr %21, align 4, !tbaa !9
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = load ptr, ptr %93, align 8, !tbaa !31
  %98 = getelementptr inbounds ptr, ptr %97, i64 4
  %99 = load ptr, ptr %98, align 8
  invoke void %99(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef %23, i32 noundef %94, i32 noundef %95, i32 noundef %96)
          to label %100 unwind label %87

100:                                              ; preds = %91
  %101 = load i32, ptr %21, align 4, !tbaa !9
  invoke void @_ZN5Gecko5Graph8reweightEj(ptr noundef nonnull align 8 dereferenceable(144) %23, i32 noundef %101)
          to label %102 unwind label %87

102:                                              ; preds = %100
  %103 = load i32, ptr %11, align 4, !tbaa !9
  invoke void @_ZN5Gecko5Graph6vcycleEjj(ptr noundef nonnull align 8 dereferenceable(144) %23, i32 noundef %103, i32 noundef 0)
          to label %104 unwind label %87

104:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %105 = invoke noundef float @_ZNK5Gecko5Graph4costEv(ptr noundef nonnull align 8 dereferenceable(144) %23)
          to label %106 unwind label %115

106:                                              ; preds = %104
  store float %105, ptr %22, align 4, !tbaa !29
  %107 = load float, ptr %22, align 4, !tbaa !29
  %108 = load float, ptr %17, align 4, !tbaa !29
  %109 = fcmp olt float %107, %108
  br i1 %109, label %110, label %119

110:                                              ; preds = %106
  %111 = load float, ptr %22, align 4, !tbaa !29
  store float %111, ptr %17, align 4, !tbaa !29
  %112 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 2
  %113 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %112)
          to label %114 unwind label %115

114:                                              ; preds = %110
  br label %119

115:                                              ; preds = %119, %110, %104
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %19, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %142

119:                                              ; preds = %114, %106
  %120 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !25
  %122 = load float, ptr %17, align 4, !tbaa !29
  %123 = load float, ptr %22, align 4, !tbaa !29
  %124 = load ptr, ptr %121, align 8, !tbaa !31
  %125 = getelementptr inbounds ptr, ptr %124, i64 5
  %126 = load ptr, ptr %125, align 8
  invoke void %126(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef %23, float noundef %122, float noundef %123)
          to label %127 unwind label %115

127:                                              ; preds = %119
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %130, label %138

130:                                              ; preds = %127
  %131 = load i32, ptr %21, align 4, !tbaa !9
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = urem i32 %131, %132
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %138, label %135

135:                                              ; preds = %130
  %136 = load i32, ptr %11, align 4, !tbaa !9
  %137 = add i32 %136, 1
  store i32 %137, ptr %11, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %135, %130, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %21, align 4, !tbaa !9
  %141 = add i32 %140, 1
  store i32 %141, ptr %21, align 4, !tbaa !9
  br label %71, !llvm.loop !33

142:                                              ; preds = %115, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %170

143:                                              ; preds = %86
  %144 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 2
  %145 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %144, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %146 unwind label %55

146:                                              ; preds = %143
  invoke void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %23, i1 noundef zeroext false)
          to label %147 unwind label %55

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147, %68
  %149 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !25
  %151 = load float, ptr %17, align 4, !tbaa !29
  %152 = load ptr, ptr %150, align 8, !tbaa !31
  %153 = getelementptr inbounds ptr, ptr %152, i64 3
  %154 = load ptr, ptr %153, align 8
  invoke void %154(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef %23, float noundef %151)
          to label %155 unwind label %55

155:                                              ; preds = %148
  %156 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8, !tbaa !25
  %158 = icmp ne ptr %157, null
  br i1 %158, label %169, label %159

159:                                              ; preds = %155
  %160 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !25
  %162 = icmp eq ptr %161, null
  br i1 %162, label %167, label %163

163:                                              ; preds = %159
  %164 = load ptr, ptr %161, align 8, !tbaa !31
  %165 = getelementptr inbounds ptr, ptr %164, i64 1
  %166 = load ptr, ptr %165, align 8
  call void %166(ptr noundef nonnull align 8 dereferenceable(8) %161) #6
  br label %167

167:                                              ; preds = %163, %159
  %168 = getelementptr inbounds %"class.Gecko::Graph", ptr %23, i32 0, i32 1
  store ptr null, ptr %168, align 8, !tbaa !25
  br label %169

169:                                              ; preds = %167, %155
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  ret void

170:                                              ; preds = %142, %55
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %19, align 8
  %173 = load i32, ptr %20, align 4
  %174 = insertvalue { ptr, i32 } poison, ptr %172, 0
  %175 = insertvalue { ptr, i32 } %174, i32 %173, 1
  resume { ptr, i32 } %175
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { builtin allocsize(0) }
attributes #6 = { nounwind }

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

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


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

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 void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; 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
declare dso_local void @_ZN5Gecko5Graph6vcycleEjj(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Gecko5Graph5orderEPNS_10FunctionalEjjjjPNS_8ProgressE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::vector", align 8
  store ptr %1, ptr %0, align 8, !tbaa !5
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %9, label %11

9:                                                ; preds = %7
  %10 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #5
  tail call void @_ZN5Gecko8ProgressC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %11

11:                                               ; preds = %7, %9
  %12 = phi ptr [ %10, %9 ], [ %6, %7 ]
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %12, ptr %13, align 8, !tbaa !23
  %14 = getelementptr inbounds i8, ptr %0, i64 136
  store i32 0, ptr %14, align 8, !tbaa !24
  %15 = tail call noundef i32 @_ZNK5Gecko5Graph5nodesEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %16 = icmp ugt i32 %15, 1
  br i1 %16, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11, %.lr.ph
  %17 = load i32, ptr %14, align 8, !tbaa !24
  %18 = add i32 %17, 1
  store i32 %18, ptr %14, align 8, !tbaa !24
  %19 = shl nuw i32 1, %18
  %20 = tail call noundef i32 @_ZNK5Gecko5Graph5nodesEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %21 = icmp ult i32 %19, %20
  br i1 %21, label %.lr.ph, label %._crit_edge, !llvm.loop !25

._crit_edge:                                      ; preds = %.lr.ph, %11
  tail call void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, i1 noundef zeroext false)
  %22 = tail call noundef float @_ZNK5Gecko5Graph4costEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  call void @_ZNSt6vectorIjSaIjEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %23)
  %.not39 = icmp eq i32 %5, 0
  br i1 %.not39, label %27, label %24

24:                                               ; preds = %._crit_edge
  invoke void @_ZN5Gecko5Graph7shuffleEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %5)
          to label %27 unwind label %25

25:                                               ; preds = %94, %93, %.critedge, %27, %24
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %100

27:                                               ; preds = %24, %._crit_edge
  %28 = load ptr, ptr %13, align 8, !tbaa !23
  %29 = load ptr, ptr %28, align 8, !tbaa !27
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load ptr, ptr %30, align 8
  invoke void %31(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull %0, float noundef %22)
          to label %32 unwind label %25

32:                                               ; preds = %27
  %33 = call noundef i32 @_ZNK5Gecko5Graph5edgesEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %.not40 = icmp eq i32 %33, 0
  br i1 %.not40, label %94, label %.preheader

.preheader:                                       ; preds = %32
  %.not4149 = icmp eq i32 %2, 0
  br i1 %.not4149, label %.critedge, label %.lr.ph53

.lr.ph53:                                         ; preds = %.preheader
  %.not45 = icmp eq i32 %4, 0
  br i1 %.not45, label %.lr.ph53.split.us, label %.lr.ph53.split

.lr.ph53.split.us:                                ; preds = %.lr.ph53, %58
  %.02651.us = phi i32 [ %59, %58 ], [ 1, %.lr.ph53 ]
  %.03150.us = phi float [ %.132.us, %58 ], [ %22, %.lr.ph53 ]
  %34 = load ptr, ptr %13, align 8, !tbaa !23
  %35 = load ptr, ptr %34, align 8, !tbaa !27
  %36 = getelementptr inbounds i8, ptr %35, i64 64
  %37 = load ptr, ptr %36, align 8
  %38 = invoke noundef zeroext i1 %37(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %39 unwind label %.split.us

39:                                               ; preds = %.lr.ph53.split.us
  br i1 %38, label %.critedge, label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %13, align 8, !tbaa !23
  %42 = load ptr, ptr %41, align 8, !tbaa !27
  %43 = getelementptr inbounds i8, ptr %42, i64 32
  %44 = load ptr, ptr %43, align 8
  invoke void %44(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull %0, i32 noundef %.02651.us, i32 noundef %2, i32 noundef %3)
          to label %45 unwind label %.split.us

45:                                               ; preds = %40
  invoke void @_ZN5Gecko5Graph8reweightEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.02651.us)
          to label %46 unwind label %.split.us

46:                                               ; preds = %45
  invoke void @_ZN5Gecko5Graph6vcycleEjj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %3, i32 noundef 0)
          to label %47 unwind label %.split.us

47:                                               ; preds = %46
  %48 = invoke noundef float @_ZNK5Gecko5Graph4costEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %49 unwind label %.split58.us

49:                                               ; preds = %47
  %50 = fcmp olt float %48, %.03150.us
  br i1 %50, label %51, label %53

51:                                               ; preds = %49
  %52 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %53 unwind label %.split58.us

53:                                               ; preds = %51, %49
  %.132.us = phi float [ %48, %51 ], [ %.03150.us, %49 ]
  %54 = load ptr, ptr %13, align 8, !tbaa !23
  %55 = load ptr, ptr %54, align 8, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %55, i64 40
  %57 = load ptr, ptr %56, align 8
  invoke void %57(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull %0, float noundef %.132.us, float noundef %48)
          to label %58 unwind label %.split58.us

58:                                               ; preds = %53
  %59 = add i32 %.02651.us, 1
  %.not41.us = icmp ugt i32 %59, %2
  br i1 %.not41.us, label %.critedge, label %.lr.ph53.split.us, !llvm.loop !29

.split.us:                                        ; preds = %46, %45, %40, %.lr.ph53.split.us
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %100

.split58.us:                                      ; preds = %53, %51, %47
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %100

.lr.ph53.split:                                   ; preds = %.lr.ph53, %89
  %.052 = phi i32 [ %spec.select, %89 ], [ %3, %.lr.ph53 ]
  %.02651 = phi i32 [ %92, %89 ], [ 1, %.lr.ph53 ]
  %.03150 = phi float [ %.132, %89 ], [ %22, %.lr.ph53 ]
  %62 = load ptr, ptr %13, align 8, !tbaa !23
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %64 = getelementptr inbounds i8, ptr %63, i64 64
  %65 = load ptr, ptr %64, align 8
  %66 = invoke noundef zeroext i1 %65(ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %67 unwind label %.split

67:                                               ; preds = %.lr.ph53.split
  br i1 %66, label %.critedge, label %70

.critedge:                                        ; preds = %67, %89, %39, %58, %.preheader
  %.031.lcssa = phi float [ %22, %.preheader ], [ %.132.us, %58 ], [ %.03150.us, %39 ], [ %.132, %89 ], [ %.03150, %67 ]
  %68 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %93 unwind label %25

.split:                                           ; preds = %76, %75, %70, %.lr.ph53.split
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %100

70:                                               ; preds = %67
  %71 = load ptr, ptr %13, align 8, !tbaa !23
  %72 = load ptr, ptr %71, align 8, !tbaa !27
  %73 = getelementptr inbounds i8, ptr %72, i64 32
  %74 = load ptr, ptr %73, align 8
  invoke void %74(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull %0, i32 noundef %.02651, i32 noundef %2, i32 noundef %.052)
          to label %75 unwind label %.split

75:                                               ; preds = %70
  invoke void @_ZN5Gecko5Graph8reweightEj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.02651)
          to label %76 unwind label %.split

76:                                               ; preds = %75
  invoke void @_ZN5Gecko5Graph6vcycleEjj(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.052, i32 noundef 0)
          to label %77 unwind label %.split

77:                                               ; preds = %76
  %78 = invoke noundef float @_ZNK5Gecko5Graph4costEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
          to label %79 unwind label %.split58

79:                                               ; preds = %77
  %80 = fcmp olt float %78, %.03150
  br i1 %80, label %81, label %84

81:                                               ; preds = %79
  %82 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %84 unwind label %.split58

.split58:                                         ; preds = %84, %81, %77
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %100

84:                                               ; preds = %81, %79
  %.132 = phi float [ %78, %81 ], [ %.03150, %79 ]
  %85 = load ptr, ptr %13, align 8, !tbaa !23
  %86 = load ptr, ptr %85, align 8, !tbaa !27
  %87 = getelementptr inbounds i8, ptr %86, i64 40
  %88 = load ptr, ptr %87, align 8
  invoke void %88(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull %0, float noundef %.132, float noundef %78)
          to label %89 unwind label %.split58

89:                                               ; preds = %84
  %90 = urem i32 %.02651, %4
  %.not46 = icmp eq i32 %90, 0
  %91 = zext i1 %.not46 to i32
  %spec.select = add i32 %.052, %91
  %92 = add i32 %.02651, 1
  %.not41 = icmp ugt i32 %92, %2
  br i1 %.not41, label %.critedge, label %.lr.ph53.split, !llvm.loop !29

93:                                               ; preds = %.critedge
  invoke void @_ZN5Gecko5Graph5placeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, i1 noundef zeroext false)
          to label %94 unwind label %25

94:                                               ; preds = %93, %32
  %.2 = phi float [ %.031.lcssa, %93 ], [ %22, %32 ]
  %95 = load ptr, ptr %13, align 8, !tbaa !23
  %96 = load ptr, ptr %95, align 8, !tbaa !27
  %97 = getelementptr inbounds i8, ptr %96, i64 24
  %98 = load ptr, ptr %97, align 8
  invoke void %98(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull %0, float noundef %.2)
          to label %99 unwind label %25

99:                                               ; preds = %94
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  ret void

100:                                              ; preds = %.split58, %.split58.us, %.split, %.split.us, %25
  %.pn.pn = phi { ptr, i32 } [ %26, %25 ], [ %69, %.split ], [ %60, %.split.us ], [ %83, %.split58 ], [ %61, %.split58.us ]
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIjSaIjEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { builtin allocsize(0) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!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 = !{!6, !7, i64 8}
!24 = !{!6, !22, i64 136}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !9, i64 0}
!29 = distinct !{!29, !26}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass