; LLVM IR from xirc/cp-algorithm :: spoj/iitkwpcg/main.ll (Z5solvev)

; 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<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.DSU = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl" }
%"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.edge = type { i32, i32, i32 }
%"struct.DSU::node" = type { i32, i32 }

@N = external dso_local global i32, align 4
@edges = external dso_local global %"class.std::vector", align 8

; 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 uwtable
define dso_local noundef i32 @_Z5solvev() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca i32, align 4
  %4 = alloca %struct.DSU, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.edge, align 4
  %10 = alloca %"struct.DSU::node", align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.DSU::node", align 4
  %14 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #6
  %15 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %1, i32 0, i32 0
  store ptr %14, ptr %15, align 8
  %16 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #6
  %17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %2, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  %18 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %1, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %2, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %19, ptr %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  %22 = load i32, ptr @N, align 4, !tbaa !5
  call void @_ZN3DSUC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr @edges, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %23 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #6
  %24 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %25 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #6
  %26 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  br label %27

27:                                               ; preds = %68, %0
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %75

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #6
  %31 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %31, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %32 = getelementptr inbounds %struct.edge, ptr %9, i32 0, i32 0
  %33 = load i32, ptr %32, align 4, !tbaa !12
  %34 = invoke i64 @_ZN3DSU8find_setEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %33)
          to label %35 unwind label %46

35:                                               ; preds = %30
  store i64 %34, ptr %10, align 4
  %36 = getelementptr inbounds %"struct.DSU::node", ptr %10, i32 0, i32 0
  %37 = load i32, ptr %36, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %38 = getelementptr inbounds %struct.edge, ptr %9, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !16
  %40 = invoke i64 @_ZN3DSU8find_setEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %39)
          to label %41 unwind label %50

41:                                               ; preds = %35
  store i64 %40, ptr %13, align 4
  %42 = getelementptr inbounds %"struct.DSU::node", ptr %13, i32 0, i32 0
  %43 = load i32, ptr %42, align 4, !tbaa !14
  %44 = icmp eq i32 %37, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br i1 %44, label %45, label %55

45:                                               ; preds = %41
  store i32 3, ptr %8, align 4
  br label %65

46:                                               ; preds = %30
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %11, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %12, align 4
  br label %54

50:                                               ; preds = %35
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %11, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %54

54:                                               ; preds = %50, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %74

55:                                               ; preds = %41
  %56 = getelementptr inbounds %struct.edge, ptr %9, i32 0, i32 0
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = getelementptr inbounds %struct.edge, ptr %9, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !16
  invoke void @_ZN3DSU9union_setEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %57, i32 noundef %59)
          to label %60 unwind label %70

60:                                               ; preds = %55
  %61 = getelementptr inbounds %struct.edge, ptr %9, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !17
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr %3, align 4, !tbaa !5
  store i32 0, ptr %8, align 4
  br label %65

65:                                               ; preds = %60, %45
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  %66 = load i32, ptr %8, align 4
  switch i32 %66, label %83 [
    i32 0, label %67
    i32 3, label %68
  ]

67:                                               ; preds = %65
  br label %68

68:                                               ; preds = %67, %65
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %27

70:                                               ; preds = %55
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %11, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %12, align 4
  br label %74

74:                                               ; preds = %70, %54
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %78

75:                                               ; preds = %29
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 1, ptr %8, align 4
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret i32 %77

78:                                               ; preds = %74
  %79 = load ptr, ptr %11, align 8
  %80 = load i32, ptr %12, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82

83:                                               ; preds = %65
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

declare i32 @__gxx_personality_v0(...)

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN3DSU4nodeE", !6, i64 0, !6, i64 4}
!16 = !{!13, !6, i64 4}
!17 = !{!13, !6, i64 8}


; 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<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.DSU = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl" }
%"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DSU::node, std::allocator<DSU::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@edges = external dso_local global %"class.std::vector", align 8

; 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 uwtable
define dso_local noundef range(i32 -2147483647, -2147483648) i32 @_Z5solvev() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.DSU, align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = tail call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  %5 = tail call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %4, ptr %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #5
  %6 = load i32, ptr @N, align 4, !tbaa !5
  call void @_ZN3DSUC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %7 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  store ptr %7, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %8 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @edges) #5
  store ptr %8, ptr %3, align 8
  %9 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %24
  %10 = add nsw i32 %.1, 1
  br label %._crit_edge

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

.lr.ph:                                           ; preds = %0, %24
  %.020 = phi i32 [ %.1, %24 ], [ 0, %0 ]
  %11 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %.sroa.03.0.copyload = load i32, ptr %11, align 4, !tbaa !5
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 4
  %.sroa.6.0.copyload = load i32, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !5
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  %.sroa.8.0.copyload = load i32, ptr %.sroa.8.0..sroa_idx, align 4, !tbaa !5
  %12 = invoke i64 @_ZN3DSU8find_setEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.sroa.03.0.copyload)
          to label %13 unwind label %17

13:                                               ; preds = %.lr.ph
  %14 = invoke i64 @_ZN3DSU8find_setEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.sroa.6.0.copyload)
          to label %15 unwind label %19

15:                                               ; preds = %13
  %.sroa.01.0.extract.trunc = trunc i64 %12 to i32
  %.sroa.0.0.extract.trunc = trunc i64 %14 to i32
  %16 = icmp eq i32 %.sroa.01.0.extract.trunc, %.sroa.0.0.extract.trunc
  br i1 %16, label %24, label %21

17:                                               ; preds = %.lr.ph
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %29

19:                                               ; preds = %13
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %29

21:                                               ; preds = %15
  invoke void @_ZN3DSU9union_setEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.sroa.03.0.copyload, i32 noundef %.sroa.6.0.copyload)
          to label %22 unwind label %27

22:                                               ; preds = %21
  %23 = add nsw i32 %.sroa.8.0.copyload, %.020
  br label %24

24:                                               ; preds = %15, %22
  %.1 = phi i32 [ %23, %22 ], [ %.020, %15 ]
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %26, label %.lr.ph, label %._crit_edge.loopexit

27:                                               ; preds = %21
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %29

29:                                               ; preds = %17, %19, %27
  %.pn15 = phi { ptr, i32 } [ %28, %27 ], [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn15
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 = { 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 #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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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