; LLVM IR from atlantis13579/Riemann :: Src/Destruction/GraphPartition.ll (ZN5metis13ComputeVolumeEPNS_7graph_tEPi)

; 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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"struct.metis::graph_t" = type { i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.7", %"class.std::vector", %"class.std::vector", i32, i32, %"class.std::vector", %"class.std::vector", i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.12", %"class.std::vector.17", %"class.std::vector.22", i32, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<metis::ckrinfo_t, std::allocator<metis::ckrinfo_t>>::_Vector_impl" }
%"struct.std::_Vector_base<metis::ckrinfo_t, std::allocator<metis::ckrinfo_t>>::_Vector_impl" = type { %"struct.std::_Vector_base<metis::ckrinfo_t, std::allocator<metis::ckrinfo_t>>::_Vector_impl_data" }
%"struct.std::_Vector_base<metis::ckrinfo_t, std::allocator<metis::ckrinfo_t>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<metis::vkrinfo_t, std::allocator<metis::vkrinfo_t>>::_Vector_impl" }
%"struct.std::_Vector_base<metis::vkrinfo_t, std::allocator<metis::vkrinfo_t>>::_Vector_impl" = type { %"struct.std::_Vector_base<metis::vkrinfo_t, std::allocator<metis::vkrinfo_t>>::_Vector_impl_data" }
%"struct.std::_Vector_base<metis::vkrinfo_t, std::allocator<metis::vkrinfo_t>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<metis::nrinfo_t, std::allocator<metis::nrinfo_t>>::_Vector_impl" }
%"struct.std::_Vector_base<metis::nrinfo_t, std::allocator<metis::nrinfo_t>>::_Vector_impl" = type { %"struct.std::_Vector_base<metis::nrinfo_t, std::allocator<metis::nrinfo_t>>::_Vector_impl_data" }
%"struct.std::_Vector_base<metis::nrinfo_t, std::allocator<metis::nrinfo_t>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN5metis7iargmaxEmPim(i64 noundef, ptr noundef, i64 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5metis13ComputeVolumeEPNS_7graph_tEPi(ptr noundef %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.metis::graph_t", ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !9
  store i32 %21, ptr %8, align 4, !tbaa !32
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.metis::graph_t", ptr %22, i32 0, i32 3
  %24 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #3
  store ptr %24, ptr %11, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.metis::graph_t", ptr %25, i32 0, i32 6
  %27 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #3
  store ptr %27, ptr %12, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.metis::graph_t", ptr %28, i32 0, i32 5
  %30 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #3
  store ptr %30, ptr %13, align 8, !tbaa !5
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load i32, ptr %8, align 4, !tbaa !32
  %33 = sext i32 %32 to i64
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = call noundef i64 @_ZN5metis7iargmaxEmPim(i64 noundef %33, ptr noundef %34, i64 noundef 1)
  %36 = getelementptr inbounds i32, ptr %31, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !32
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %9, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #3
  %39 = load i32, ptr %9, align 4, !tbaa !32
  %40 = sext i32 %39 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 -1, ptr %15, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #3
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %40, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %41 unwind label %103

41:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  store i32 0, ptr %10, align 4, !tbaa !32
  store i32 0, ptr %5, align 4, !tbaa !32
  br label %42

42:                                               ; preds = %112, %41
  %43 = load i32, ptr %5, align 4, !tbaa !32
  %44 = load i32, ptr %8, align 4, !tbaa !32
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %46, label %115

46:                                               ; preds = %42
  %47 = load i32, ptr %5, align 4, !tbaa !32
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = load i32, ptr %5, align 4, !tbaa !32
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %48, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !32
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %53) #3
  store i32 %47, ptr %54, align 4, !tbaa !32
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = load i32, ptr %5, align 4, !tbaa !32
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %55, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !32
  store i32 %59, ptr %6, align 4, !tbaa !32
  br label %60

60:                                               ; preds = %108, %46
  %61 = load i32, ptr %6, align 4, !tbaa !32
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !32
  %64 = add nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %62, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !32
  %68 = icmp slt i32 %61, %67
  br i1 %68, label %69, label %111

69:                                               ; preds = %60
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load i32, ptr %6, align 4, !tbaa !32
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i32, ptr %71, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !32
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i32, ptr %70, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !32
  store i32 %78, ptr %7, align 4, !tbaa !32
  %79 = load i32, ptr %7, align 4, !tbaa !32
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %80) #3
  %82 = load i32, ptr %81, align 4, !tbaa !32
  %83 = load i32, ptr %5, align 4, !tbaa !32
  %84 = icmp ne i32 %82, %83
  br i1 %84, label %85, label %107

85:                                               ; preds = %69
  %86 = load i32, ptr %5, align 4, !tbaa !32
  %87 = load i32, ptr %7, align 4, !tbaa !32
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %88) #3
  store i32 %86, ptr %89, align 4, !tbaa !32
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %98

92:                                               ; preds = %85
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = load i32, ptr %5, align 4, !tbaa !32
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i32, ptr %93, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !32
  br label %99

98:                                               ; preds = %85
  br label %99

99:                                               ; preds = %98, %92
  %100 = phi i32 [ %97, %92 ], [ 1, %98 ]
  %101 = load i32, ptr %10, align 4, !tbaa !32
  %102 = add nsw i32 %101, %100
  store i32 %102, ptr %10, align 4, !tbaa !32
  br label %107

103:                                              ; preds = %2
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %17, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %18, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %117

107:                                              ; preds = %99, %69
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %6, align 4, !tbaa !32
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %6, align 4, !tbaa !32
  br label %60, !llvm.loop !33

111:                                              ; preds = %60
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %5, align 4, !tbaa !32
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %5, align 4, !tbaa !32
  br label %42, !llvm.loop !35

115:                                              ; preds = %42
  %116 = load i32, ptr %10, align 4, !tbaa !32
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret i32 %116

117:                                              ; preds = %103
  %118 = load ptr, ptr %17, align 8
  %119 = load i32, ptr %18, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !11, i64 0}
!10 = !{!"_ZTSN5metis7graph_tE", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !12, i64 40, !12, i64 64, !12, i64 88, !12, i64 112, !12, i64 136, !16, i64 160, !12, i64 184, !12, i64 208, !11, i64 232, !11, i64 236, !12, i64 240, !12, i64 264, !11, i64 288, !12, i64 296, !12, i64 320, !12, i64 344, !12, i64 368, !20, i64 392, !24, i64 416, !28, i64 440, !11, i64 464, !6, i64 472, !6, i64 480}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorIfSaIfEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorIN5metis9ckrinfo_tESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIN5metis9vkrinfo_tESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorIN5metis8nrinfo_tESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!11, !11, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}


; 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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN5metis7iargmaxEmPim(i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN5metis13ComputeVolumeEPNS_7graph_tEPi(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::allocator", align 1
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = tail call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  %10 = tail call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #3
  %11 = getelementptr inbounds i8, ptr %0, i64 64
  %12 = tail call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  %13 = sext i32 %6 to i64
  %14 = tail call noundef i64 @_ZN5metis7iargmaxEmPim(i64 noundef %13, ptr noundef %1, i64 noundef 1)
  %15 = getelementptr inbounds i32, ptr %1, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !31
  %17 = add nsw i32 %16, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #3
  %18 = sext i32 %17 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 -1, ptr %4, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #3
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %18, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %19 unwind label %74

19:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  %20 = icmp sgt i32 %6, 0
  br i1 %20, label %.lr.ph43, label %._crit_edge

.lr.ph43:                                         ; preds = %19
  %.not36 = icmp eq ptr %12, null
  %wide.trip.count57 = zext nneg i32 %6 to i64
  br i1 %.not36, label %.lr.ph43.split.us, label %.lr.ph43.split

.lr.ph43.split.us:                                ; preds = %.lr.ph43, %.loopexit.us
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.loopexit.us ], [ 0, %.lr.ph43 ]
  %.03441.us = phi i32 [ %.1.lcssa.us, %.loopexit.us ], [ 0, %.lr.ph43 ]
  %21 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv54
  %22 = load i32, ptr %21, align 4, !tbaa !31
  %23 = sext i32 %22 to i64
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %23) #3
  %25 = trunc nuw nsw i64 %indvars.iv54 to i32
  store i32 %25, ptr %24, align 4, !tbaa !31
  %26 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv54
  %27 = load i32, ptr %26, align 4, !tbaa !31
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %28 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv.next55
  %29 = load i32, ptr %28, align 4, !tbaa !31
  %30 = icmp slt i32 %27, %29
  br i1 %30, label %.lr.ph.us.preheader, label %.loopexit.us

.lr.ph.us.preheader:                              ; preds = %.lr.ph43.split.us
  %31 = sext i32 %27 to i64
  br label %.lr.ph.us

.loopexit.us:                                     ; preds = %44, %.lr.ph43.split.us
  %.1.lcssa.us = phi i32 [ %.03441.us, %.lr.ph43.split.us ], [ %.2.us.us, %44 ]
  %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
  br i1 %exitcond58.not, label %._crit_edge, label %.lr.ph43.split.us, !llvm.loop !32

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %44
  %indvars.iv51 = phi i64 [ %31, %.lr.ph.us.preheader ], [ %indvars.iv.next52, %44 ]
  %.137.us.us = phi i32 [ %.03441.us, %.lr.ph.us.preheader ], [ %.2.us.us, %44 ]
  %32 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv51
  %33 = load i32, ptr %32, align 4, !tbaa !31
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %1, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !31
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %37) #3
  %39 = load i32, ptr %38, align 4, !tbaa !31
  %40 = zext i32 %39 to i64
  %.not.us.us = icmp eq i64 %indvars.iv54, %40
  br i1 %.not.us.us, label %44, label %41

41:                                               ; preds = %.lr.ph.us
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %37) #3
  store i32 %25, ptr %42, align 4, !tbaa !31
  %43 = add nsw i32 %.137.us.us, 1
  br label %44

44:                                               ; preds = %41, %.lr.ph.us
  %.2.us.us = phi i32 [ %43, %41 ], [ %.137.us.us, %.lr.ph.us ]
  %indvars.iv.next52 = add nsw i64 %indvars.iv51, 1
  %45 = load i32, ptr %28, align 4, !tbaa !31
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next52, %46
  br i1 %47, label %.lr.ph.us, label %.loopexit.us, !llvm.loop !34

.loopexit:                                        ; preds = %76, %.lr.ph43.split
  %.1.lcssa = phi i32 [ %.03441, %.lr.ph43.split ], [ %.2, %76 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next49, %wide.trip.count57
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph43.split, !llvm.loop !32

.lr.ph43.split:                                   ; preds = %.lr.ph43, %.loopexit
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.loopexit ], [ 0, %.lr.ph43 ]
  %.03441 = phi i32 [ %.1.lcssa, %.loopexit ], [ 0, %.lr.ph43 ]
  %48 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv48
  %49 = load i32, ptr %48, align 4, !tbaa !31
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %50) #3
  %52 = trunc nuw nsw i64 %indvars.iv48 to i32
  store i32 %52, ptr %51, align 4, !tbaa !31
  %53 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv48
  %54 = load i32, ptr %53, align 4, !tbaa !31
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %55 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv.next49
  %56 = load i32, ptr %55, align 4, !tbaa !31
  %57 = icmp slt i32 %54, %56
  br i1 %57, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.lr.ph43.split
  %58 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv48
  %59 = sext i32 %54 to i64
  br label %60

60:                                               ; preds = %.lr.ph, %76
  %indvars.iv = phi i64 [ %59, %.lr.ph ], [ %indvars.iv.next, %76 ]
  %.137 = phi i32 [ %.03441, %.lr.ph ], [ %.2, %76 ]
  %61 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  %62 = load i32, ptr %61, align 4, !tbaa !31
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %1, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !31
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %66) #3
  %68 = load i32, ptr %67, align 4, !tbaa !31
  %69 = zext i32 %68 to i64
  %.not = icmp eq i64 %indvars.iv48, %69
  br i1 %.not, label %76, label %70

70:                                               ; preds = %60
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %66) #3
  store i32 %52, ptr %71, align 4, !tbaa !31
  %72 = load i32, ptr %58, align 4, !tbaa !31
  %73 = add nsw i32 %72, %.137
  br label %76

74:                                               ; preds = %2
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #3
  resume { ptr, i32 } %75

76:                                               ; preds = %60, %70
  %.2 = phi i32 [ %73, %70 ], [ %.137, %60 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %77 = load i32, ptr %55, align 4, !tbaa !31
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next, %78
  br i1 %79, label %60, label %.loopexit, !llvm.loop !34

._crit_edge:                                      ; preds = %.loopexit, %.loopexit.us, %19
  %.034.lcssa = phi i32 [ 0, %19 ], [ %.1.lcssa.us, %.loopexit.us ], [ %.1.lcssa, %.loopexit ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #3
  ret i32 %.034.lcssa
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 0}
!6 = !{!"_ZTSN5metis7graph_tE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 40, !10, i64 64, !10, i64 88, !10, i64 112, !10, i64 136, !15, i64 160, !10, i64 184, !10, i64 208, !7, i64 232, !7, i64 236, !10, i64 240, !10, i64 264, !7, i64 288, !10, i64 296, !10, i64 320, !10, i64 344, !10, i64 368, !19, i64 392, !23, i64 416, !27, i64 440, !7, i64 464, !14, i64 472, !14, i64 480}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIfSaIfEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"_ZTSSt6vectorIN5metis9ckrinfo_tESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!23 = !{!"_ZTSSt6vectorIN5metis9vkrinfo_tESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!27 = !{!"_ZTSSt6vectorIN5metis8nrinfo_tESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


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