; LLVM IR from MtSaka/library :: test/yosupo/tree/jump_on_tree.test (main)

; 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.Graph = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.LCA = type { %struct.Graph.base, %"class.std::vector.1", %"class.std::vector.6", %"class.std::vector.1", %"class.std::vector.1" }
%struct.Graph.base = type <{ %"class.std::vector", i32 }>
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl" }
%"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl" = type { %"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = 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 }

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.Graph, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.LCA, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  %13 = load i32, ptr %2, align 4, !tbaa !5
  call void @_ZN5GraphI14UnweightedEdgeEC2Ei(ptr noundef nonnull align 8 dereferenceable(28) %4, i32 noundef %13)
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sub nsw i32 %14, 1
  invoke void @_ZN5GraphI14UnweightedEdgeE4readEiibb(ptr noundef nonnull align 8 dereferenceable(28) %4, i32 noundef %15, i32 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %16 unwind label %25

16:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 128, ptr %7) #5
  invoke void @_ZN3LCAI14UnweightedEdgeEC2ERK5GraphIS0_E(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull align 8 dereferenceable(28) %4)
          to label %17 unwind label %29

17:                                               ; preds = %16
  invoke void @_ZN3LCAI14UnweightedEdgeE5buildEi(ptr noundef nonnull align 8 dereferenceable(128) %7, i32 noundef 0)
          to label %18 unwind label %33

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %45, %18
  %20 = load i64, ptr %8, align 8, !tbaa !9
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %20, %22
  br i1 %23, label %37, label %24

24:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %57

25:                                               ; preds = %0
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %5, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %6, align 4
  br label %61

29:                                               ; preds = %16
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %5, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %6, align 4
  br label %60

33:                                               ; preds = %17
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %5, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %6, align 4
  br label %59

37:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  invoke void @_Z4scanIiJiiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %38 unwind label %48

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %39 = load i32, ptr %9, align 4, !tbaa !5
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = invoke noundef i32 @_ZNK3LCAI14UnweightedEdgeE4jumpEiii(ptr noundef nonnull align 8 dereferenceable(128) %7, i32 noundef %39, i32 noundef %40, i32 noundef %41)
          to label %43 unwind label %52

43:                                               ; preds = %38
  store i32 %42, ptr %12, align 4, !tbaa !5
  invoke void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %44 unwind label %52

44:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %45

45:                                               ; preds = %44
  %46 = load i64, ptr %8, align 8, !tbaa !9
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %8, align 8, !tbaa !9
  br label %19, !llvm.loop !11

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  br label %56

52:                                               ; preds = %43, %38
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %5, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %56

56:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %59

57:                                               ; preds = %24
  call void @_ZN3LCAI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #5
  call void @_ZN5GraphI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %58 = load i32, ptr %1, align 4
  ret i32 %58

59:                                               ; preds = %56, %33
  call void @_ZN3LCAI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #5
  br label %60

60:                                               ; preds = %59, %29
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #5
  br label %61

61:                                               ; preds = %60, %25
  call void @_ZN5GraphI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr %5, align 8
  %64 = load i32, ptr %6, align 4
  %65 = insertvalue { ptr, i32 } poison, ptr %63, 0
  %66 = insertvalue { ptr, i32 } %65, i32 %64, 1
  resume { ptr, i32 } %66
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5GraphI14UnweightedEdgeEC2Ei(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5GraphI14UnweightedEdgeE4readEiibb(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3LCAI14UnweightedEdgeEC2ERK5GraphIS0_E(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanIiJiiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3LCAI14UnweightedEdgeE4jumpEiii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, i32 noundef) #3 align 2

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

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !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"

%struct.Graph = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Edge<UnweightedEdge>>, std::allocator<std::vector<Edge<UnweightedEdge>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.LCA = type { %struct.Graph.base, %"class.std::vector.1", %"class.std::vector.6", %"class.std::vector.1", %"class.std::vector.1" }
%struct.Graph.base = type <{ %"class.std::vector", i32 }>
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl" }
%"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl" = type { %"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UnweightedEdge, std::allocator<UnweightedEdge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = 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 }

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.Graph, align 8
  %4 = alloca %struct.LCA, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  %9 = load i32, ptr %1, align 4, !tbaa !5
  call void @_ZN5GraphI14UnweightedEdgeEC2Ei(ptr noundef nonnull align 8 dereferenceable(28) %3, i32 noundef %9)
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  invoke void @_ZN5GraphI14UnweightedEdgeE4readEiibb(ptr noundef nonnull align 8 dereferenceable(28) %3, i32 noundef %11, i32 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %12 unwind label %16

12:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #5
  invoke void @_ZN3LCAI14UnweightedEdgeEC2ERK5GraphIS0_E(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 8 dereferenceable(28) %3)
          to label %13 unwind label %18

13:                                               ; preds = %12
  invoke void @_ZN3LCAI14UnweightedEdgeE5buildEi(ptr noundef nonnull align 8 dereferenceable(128) %4, i32 noundef 0)
          to label %.preheader unwind label %20

.preheader:                                       ; preds = %13
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %28, %.preheader
  call void @_ZN3LCAI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #5
  call void @_ZN5GraphI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

16:                                               ; preds = %0
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %40

18:                                               ; preds = %12
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %39

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

.lr.ph:                                           ; preds = %.preheader, %28
  %.013 = phi i64 [ %29, %28 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  invoke void @_Z4scanIiJiiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %22 unwind label %33

22:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = load i32, ptr %7, align 4, !tbaa !5
  %26 = invoke noundef i32 @_ZNK3LCAI14UnweightedEdgeE4jumpEiii(ptr noundef nonnull align 8 dereferenceable(128) %4, i32 noundef %23, i32 noundef %24, i32 noundef %25)
          to label %27 unwind label %35

27:                                               ; preds = %22
  store i32 %26, ptr %8, align 4, !tbaa !5
  invoke void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %28 unwind label %35

28:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %29 = add nuw nsw i64 %.013, 1
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %29, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !9

33:                                               ; preds = %.lr.ph
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %37

35:                                               ; preds = %27, %22
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %37

37:                                               ; preds = %35, %33
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %38

38:                                               ; preds = %37, %20
  %.pn.pn = phi { ptr, i32 } [ %.pn, %37 ], [ %21, %20 ]
  call void @_ZN3LCAI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #5
  br label %39

39:                                               ; preds = %38, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %38 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #5
  br label %40

40:                                               ; preds = %39, %16
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %39 ], [ %17, %16 ]
  call void @_ZN5GraphI14UnweightedEdgeED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5GraphI14UnweightedEdgeEC2Ei(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5GraphI14UnweightedEdgeE4readEiibb(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3LCAI14UnweightedEdgeEC2ERK5GraphIS0_E(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanIiJiiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3LCAI14UnweightedEdgeE4jumpEiii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 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"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass