; LLVM IR from Leet-Us-Code/DSA-A-Z-Practice :: Sid's Levels/Level - 3/Binary Search Tree/Shortest Tree Path.ll (Z12shortestDistP4nodeii)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z10nodeToRootP4nodeiRSt6vectorIS0_SaIS0_EE(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #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 @_Z12shortestDistP4nodeii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = invoke noundef zeroext i1 @_Z10nodeToRootP4nodeiRSt6vectorIS0_SaIS0_EE(ptr noundef %18, i32 noundef %19, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %21 unwind label %67

21:                                               ; preds = %3
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = invoke noundef zeroext i1 @_Z10nodeToRootP4nodeiRSt6vectorIS0_SaIS0_EE(ptr noundef %22, i32 noundef %23, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %25 unwind label %67

25:                                               ; preds = %21
  %26 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  %28 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  %30 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPP4nodeSt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %31, ptr %33)
          to label %34 unwind label %67

34:                                               ; preds = %25
  %35 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  %37 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPP4nodeSt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %40, ptr %42)
          to label %43 unwind label %67

43:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %71, %43
  %45 = load i32, ptr %15, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %48 = icmp ult i64 %46, %47
  br i1 %48, label %49, label %54

49:                                               ; preds = %44
  %50 = load i32, ptr %16, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %53 = icmp ult i64 %51, %52
  br label %54

54:                                               ; preds = %49, %44
  %55 = phi i1 [ false, %44 ], [ %53, %49 ]
  br i1 %55, label %56, label %76

56:                                               ; preds = %54
  %57 = load i32, ptr %15, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4nodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %58) #4
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4nodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %62) #4
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = icmp ne ptr %60, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %56
  br label %76

67:                                               ; preds = %34, %25, %21, %3
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  br label %88

71:                                               ; preds = %56
  %72 = load i32, ptr %15, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %15, align 4, !tbaa !9
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %16, align 4, !tbaa !9
  br label %44, !llvm.loop !11

76:                                               ; preds = %66, %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %77 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = sub i64 %77, %79
  %81 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %82 = add i64 %80, %81
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = sub i64 %82, %84
  %86 = trunc i64 %85 to i32
  store i32 %86, ptr %17, align 4, !tbaa !9
  %87 = load i32, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  ret i32 %87

88:                                               ; preds = %67
  %89 = load ptr, ptr %9, align 8
  %90 = load i32, ptr %10, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z10nodeToRootP4nodeiRSt6vectorIS0_SaIS0_EE(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) 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 @_Z12shortestDistP4nodeii(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %6 = invoke noundef zeroext i1 @_Z10nodeToRootP4nodeiRSt6vectorIS0_SaIS0_EE(ptr noundef %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %7 unwind label %23

7:                                                ; preds = %3
  %8 = invoke noundef zeroext i1 @_Z10nodeToRootP4nodeiRSt6vectorIS0_SaIS0_EE(ptr noundef %0, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %9 unwind label %23

9:                                                ; preds = %7
  %10 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %11 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPP4nodeSt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %10, ptr %11)
          to label %12 unwind label %23

12:                                               ; preds = %9
  %13 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %14 = call ptr @_ZNSt6vectorIP4nodeSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPP4nodeSt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %13, ptr %14)
          to label %.preheader unwind label %23

.preheader:                                       ; preds = %12
  %15 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %.not29 = icmp eq i64 %15, 0
  br i1 %.not29, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %25
  %indvars.iv = phi i64 [ %indvars.iv.next, %25 ], [ 0, %.preheader ]
  %16 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %17 = icmp ugt i64 %16, %indvars.iv
  br i1 %17, label %18, label %.critedge.loopexit

18:                                               ; preds = %.lr.ph
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4nodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #4
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4nodeSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #4
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %.not = icmp eq ptr %20, %22
  br i1 %.not, label %25, label %.critedge.loopexit

23:                                               ; preds = %12, %9, %7, %3
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  resume { ptr, i32 } %24

25:                                               ; preds = %18
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %27 = icmp ugt i64 %26, %indvars.iv.next
  br i1 %27, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !9

.critedge.loopexit:                               ; preds = %25, %18, %.lr.ph
  %.017.lcssa.ph.in = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv, %18 ], [ %indvars.iv.next, %25 ]
  %.017.lcssa.ph = trunc i64 %.017.lcssa.ph.in to i32
  %28 = shl i32 %.017.lcssa.ph, 1
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.preheader
  %.017.lcssa = phi i32 [ 0, %.preheader ], [ %28, %.critedge.loopexit ]
  %29 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %30 = call noundef i64 @_ZNKSt6vectorIP4nodeSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %31 = add i64 %30, %29
  %32 = trunc i64 %31 to i32
  %33 = sub i32 %32, %.017.lcssa
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @_ZNSt6vectorIP4nodeSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  ret i32 %33
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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