; LLVM IR from atlantis13579/Riemann :: Src/Destruction/GraphPartition.ll (ZN5metis10ComputeCutEPNS_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"

%"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" = 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::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: 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(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_ZN5metis10ComputeCutEPNS_7graph_tEPi(ptr noundef %0, ptr noundef %1) #1 {
  %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
  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) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %"struct.metis::graph_t", ptr %8, i32 0, i32 7
  %10 = call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #2
  br i1 %10, label %11, label %64

11:                                               ; preds = %2
  store i32 0, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %60, %11
  %13 = load i32, ptr %5, align 4, !tbaa !9
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.metis::graph_t", ptr %14, i32 0, i32 0
  %16 = load i32, ptr %15, align 8, !tbaa !11
  %17 = icmp slt i32 %13, %16
  br i1 %17, label %18, label %63

18:                                               ; preds = %12
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.metis::graph_t", ptr %19, i32 0, i32 3
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %22) #2
  %24 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %24, ptr %6, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %56, %18
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.metis::graph_t", ptr %27, i32 0, i32 3
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %31) #2
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = icmp slt i32 %26, %33
  br i1 %34, label %35, label %59

35:                                               ; preds = %25
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i32, ptr %36, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.metis::graph_t", ptr %42, i32 0, i32 6
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #2
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %41, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = icmp ne i32 %40, %50
  br i1 %51, label %52, label %55

52:                                               ; preds = %35
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %7, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %52, %35
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %6, align 4, !tbaa !9
  br label %25, !llvm.loop !33

59:                                               ; preds = %25
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %5, align 4, !tbaa !9
  br label %12, !llvm.loop !35

63:                                               ; preds = %12
  br label %123

64:                                               ; preds = %2
  store i32 0, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %119, %64
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.metis::graph_t", ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 8, !tbaa !11
  %70 = icmp slt i32 %66, %69
  br i1 %70, label %71, label %122

71:                                               ; preds = %65
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.metis::graph_t", ptr %72, i32 0, i32 3
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #2
  %77 = load i32, ptr %76, align 4, !tbaa !9
  store i32 %77, ptr %6, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %115, %71
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.metis::graph_t", ptr %80, i32 0, i32 3
  %82 = load i32, ptr %5, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %84) #2
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = icmp slt i32 %79, %86
  br i1 %87, label %88, label %118

88:                                               ; preds = %78
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load i32, ptr %5, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %89, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.metis::graph_t", ptr %95, i32 0, i32 6
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98) #2
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %94, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = icmp ne i32 %93, %103
  br i1 %104, label %105, label %114

105:                                              ; preds = %88
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.metis::graph_t", ptr %106, i32 0, i32 7
  %108 = load i32, ptr %6, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %109) #2
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = add nsw i32 %112, %111
  store i32 %113, ptr %7, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %105, %88
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %6, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %6, align 4, !tbaa !9
  br label %78, !llvm.loop !36

118:                                              ; preds = %78
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %5, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %5, align 4, !tbaa !9
  br label %65, !llvm.loop !37

122:                                              ; preds = %65
  br label %123

123:                                              ; preds = %122, %63
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = sdiv i32 %124, 2
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #2
  ret i32 %125
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 = { 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, !10, i64 0}
!12 = !{!"_ZTSN5metis7graph_tE", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !13, i64 40, !13, i64 64, !13, i64 88, !13, i64 112, !13, i64 136, !17, i64 160, !13, i64 184, !13, i64 208, !10, i64 232, !10, i64 236, !13, i64 240, !13, i64 264, !10, i64 288, !13, i64 296, !13, i64 320, !13, i64 344, !13, i64 368, !21, i64 392, !25, i64 416, !29, i64 440, !10, i64 464, !6, i64 472, !6, i64 480}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIfSaIfEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIN5metis9ckrinfo_tESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN5metis9ckrinfo_tESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIN5metis9vkrinfo_tESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN5metis9vkrinfo_tESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorIN5metis8nrinfo_tESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN5metis8nrinfo_tESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !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"

; 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
define dso_local noundef range(i32 -1073741824, 1073741824) i32 @_ZN5metis10ComputeCutEPNS_7graph_tEPi(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 112
  %4 = tail call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #1
  %5 = load i32, ptr %0, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %4, label %.preheader, label %.preheader40

.preheader40:                                     ; preds = %2
  br i1 %6, label %.lr.ph48, label %.loopexit38

.lr.ph48:                                         ; preds = %.preheader40
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %0, i64 88
  br label %37

.preheader:                                       ; preds = %2
  br i1 %6, label %.lr.ph57, label %.loopexit38

.lr.ph57:                                         ; preds = %.preheader
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = getelementptr inbounds i8, ptr %0, i64 88
  br label %14

.loopexit:                                        ; preds = %22, %14
  %.1.lcssa = phi i32 [ %.056, %14 ], [ %spec.select, %22 ]
  %11 = load i32, ptr %0, align 8, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = icmp slt i64 %indvars.iv.next68, %12
  br i1 %13, label %14, label %.loopexit38, !llvm.loop !31

14:                                               ; preds = %.lr.ph57, %.loopexit
  %indvars.iv67 = phi i64 [ 0, %.lr.ph57 ], [ %indvars.iv.next68, %.loopexit ]
  %.056 = phi i32 [ 0, %.lr.ph57 ], [ %.1.lcssa, %.loopexit ]
  %15 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv67) #1
  %16 = load i32, ptr %15, align 4, !tbaa !33
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %17 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv.next68) #1
  %18 = load i32, ptr %17, align 4, !tbaa !33
  %19 = icmp slt i32 %16, %18
  br i1 %19, label %.lr.ph52, label %.loopexit

.lr.ph52:                                         ; preds = %14
  %20 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv67
  %21 = sext i32 %16 to i64
  br label %22

22:                                               ; preds = %.lr.ph52, %22
  %indvars.iv64 = phi i64 [ %21, %.lr.ph52 ], [ %indvars.iv.next65, %22 ]
  %.151 = phi i32 [ %.056, %.lr.ph52 ], [ %spec.select, %22 ]
  %23 = load i32, ptr %20, align 4, !tbaa !33
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv64) #1
  %25 = load i32, ptr %24, align 4, !tbaa !33
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i32, ptr %1, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !33
  %.not37 = icmp ne i32 %23, %28
  %29 = zext i1 %.not37 to i32
  %spec.select = add nsw i32 %.151, %29
  %indvars.iv.next65 = add nsw i64 %indvars.iv64, 1
  %30 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv.next68) #1
  %31 = load i32, ptr %30, align 4, !tbaa !33
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next65, %32
  br i1 %33, label %22, label %.loopexit, !llvm.loop !34

.loopexit39:                                      ; preds = %56, %37
  %.4.lcssa = phi i32 [ %.347, %37 ], [ %.5, %56 ]
  %34 = load i32, ptr %0, align 8, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next62, %35
  br i1 %36, label %37, label %.loopexit38, !llvm.loop !35

37:                                               ; preds = %.lr.ph48, %.loopexit39
  %indvars.iv61 = phi i64 [ 0, %.lr.ph48 ], [ %indvars.iv.next62, %.loopexit39 ]
  %.347 = phi i32 [ 0, %.lr.ph48 ], [ %.4.lcssa, %.loopexit39 ]
  %38 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv61) #1
  %39 = load i32, ptr %38, align 4, !tbaa !33
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %40 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv.next62) #1
  %41 = load i32, ptr %40, align 4, !tbaa !33
  %42 = icmp slt i32 %39, %41
  br i1 %42, label %.lr.ph, label %.loopexit39

.lr.ph:                                           ; preds = %37
  %43 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv61
  %44 = sext i32 %39 to i64
  br label %45

45:                                               ; preds = %.lr.ph, %56
  %indvars.iv = phi i64 [ %44, %.lr.ph ], [ %indvars.iv.next, %56 ]
  %.444 = phi i32 [ %.347, %.lr.ph ], [ %.5, %56 ]
  %46 = load i32, ptr %43, align 4, !tbaa !33
  %47 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #1
  %48 = load i32, ptr %47, align 4, !tbaa !33
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %1, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !33
  %.not = icmp eq i32 %46, %51
  br i1 %.not, label %56, label %52

52:                                               ; preds = %45
  %53 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #1
  %54 = load i32, ptr %53, align 4, !tbaa !33
  %55 = add nsw i32 %54, %.444
  br label %56

56:                                               ; preds = %45, %52
  %.5 = phi i32 [ %55, %52 ], [ %.444, %45 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %57 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv.next62) #1
  %58 = load i32, ptr %57, align 4, !tbaa !33
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next, %59
  br i1 %60, label %45, label %.loopexit39, !llvm.loop !36

.loopexit38:                                      ; preds = %.loopexit39, %.loopexit, %.preheader40, %.preheader
  %.6 = phi i32 [ 0, %.preheader ], [ 0, %.preheader40 ], [ %.1.lcssa, %.loopexit ], [ %.4.lcssa, %.loopexit39 ]
  %61 = sdiv i32 %.6, 2
  ret i32 %61
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_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 = { 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 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !32}
!35 = distinct !{!35, !32}
!36 = distinct !{!36, !32}


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